Preserve errno after the output write, and if the output pipe is closed, propagate this to the main loop so it does not wait forever for the pipe buffer to empty.
This commit is contained in:
@@ -175,6 +175,7 @@ struct pvstate_s {
|
||||
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 */
|
||||
volatile sig_atomic_t pipe_closed; /* whether the output pipe was closed */
|
||||
} flag;
|
||||
|
||||
/*****************
|
||||
|
||||
Reference in New Issue
Block a user