Raise a SIGCONT to the whole process group after receiving a SIGTTOU, so that pipelines can be resumed in the background (for example "pv /dev/zero | cat > /dev/null" can now be suspended and put into the background - if we do not send that signal then "cat" remains stopped, as mentioned in issue #56).

This commit is contained in:
Andrew Wood
2024-10-04 10:24:08 +01:00
parent 94ea82c10a
commit 545769885d
3 changed files with 82 additions and 38 deletions
+1
View File
@@ -171,6 +171,7 @@ struct pvstate_s {
volatile sig_atomic_t trigger_exit; /* whether we need to abort right now */
volatile sig_atomic_t clear_tty_tostop_on_exit; /* whether to clear tty TOSTOP on exit */
volatile sig_atomic_t suspend_stderr; /* whether writing to stderr is suspended */
volatile sig_atomic_t skip_next_sigcont; /* whether to ignore the next SIGCONT */
} flag;
/*****************