+echo "The following processes have been found:"
+printf '%s\n' "$processes"
+
+if ! yes_or_no "Would you like to send SIGTERM to all processes?"; then
+ echo "Aborted."
+ exit 0
+fi
+
+pkill -f '\.exe([[:space:]]|$)'
+
+echo "Waiting for processes to terminate..."
+sleep 7
+
+processes="$(get_wine_processes)"
+
+if [[ -z "$processes" ]]; then
+ echo "All processes have been cleaned!"
+ exit 0
+fi
+
+echo "The following processes are still running:"
+printf '%s\n' "$processes"
+
+if ! yes_or_no "Would you like to send SIGKILL to all remaining processes?"; then
+ echo "Some processes remain:"
+ printf '%s\n' "$processes"
+ exit 1
+fi
+
+pkill -9 -f '\.exe([[:space:]]|$)'
+
+sleep 1
+
+processes="$(get_wine_processes)"
+
+if [[ -n "$processes" ]]; then
+ echo "Some processes are still running. Please remove them manually:"
+ printf '%s\n' "$processes"
+ exit 1
+fi
+
+echo "All processes have been cleaned!"
+