Handle job-control signals and clear tostop

Prevent terminal job-control signals from suspending the script during recovery by trapping TSTP, TTIN and TTOU (instead of only TSTP) and restoring them on exit. Also clear the terminal 'tostop' flag in stop_spinner() with `stty -tostop` to avoid background spinner I/O from stopping the process group.
This commit is contained in:
CanbiZ (MickLesk)
2026-02-25 14:45:11 +01:00
parent 340d999b2b
commit b09f2db2a9
2 changed files with 6 additions and 4 deletions

View File

@@ -607,6 +607,7 @@ stop_spinner() {
unset SPINNER_PID SPINNER_MSG
stty sane 2>/dev/null || true
stty -tostop 2>/dev/null || true
}
# ==============================================================================