Make signal handler setup/teardown two common functions instead of six,

and reset SIGCHLD after fork to fix problems with some shells. From
Romain Francois.
This commit is contained in:
Nicholas Marriott
2010-05-03 16:06:32 +00:00
parent c919139433
commit ec1d37b1b2
9 changed files with 123 additions and 154 deletions

View File

@ -91,7 +91,7 @@ cmd_pipe_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
case 0:
/* Child process. */
close(pipe_fd[0]);
server_signal_clear();
clear_signals();
if (dup2(pipe_fd[1], STDIN_FILENO) == -1)
_exit(1);