When flushing output we don't care whether we are the foreground
process or not, we still need to flush to /dev/tty. If we are in the background, it is OK to get SIGTTOU.
This commit is contained in:
@@ -926,8 +926,7 @@ del_io_events(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Flush any write buffers with data in them. */
|
/* Flush any write buffers with data in them. */
|
||||||
if (iob->wevent != NULL &&
|
if (iob->wevent != NULL) {
|
||||||
(foreground || !USERTTY_EVENT(iob->wevent))) {
|
|
||||||
if (iob->len > iob->off) {
|
if (iob->len > iob->off) {
|
||||||
if (sudo_ev_add(evbase, iob->wevent, false) == -1)
|
if (sudo_ev_add(evbase, iob->wevent, false) == -1)
|
||||||
fatal(_("unable to add event to queue"));
|
fatal(_("unable to add event to queue"));
|
||||||
|
Reference in New Issue
Block a user