Revert "finish cleanup of signal blocking code"

This reverts commit fb08fe5f47.

Needed to cleanly apply PR#4268. Will reapply after applying that
change.
This commit is contained in:
Kurtis Rader
2017-08-06 14:38:25 -07:00
parent 4fe9d79438
commit 35ee28ff24
8 changed files with 86 additions and 18 deletions

View File

@@ -109,9 +109,9 @@ bool set_child_group(job_t *j, process_t *p, int print_errors) {
int result = -1;
errno = EINTR;
while (result == -1 && errno == EINTR) {
signal_block();
signal_block(true);
result = tcsetpgrp(STDIN_FILENO, j->pgid);
signal_unblock();
signal_unblock(true);
}
if (result == -1) {
if (errno == ENOTTY) redirect_tty_output();
@@ -251,6 +251,8 @@ int setup_child_process(job_t *j, process_t *p, const io_chain_t &io_chain) {
signal_reset_handlers();
}
signal_unblock(); // remove all signal blocks
return ok ? 0 : -1;
}