1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-06 22:12:47 -05:00

Jacob has pointed out why SIGCHLD was blocked, so I've updated the

comment when I unblock it in pty.c to reflect reality. Also I've
moved block_signal() out of pterm.c into signal.c, so I can
conveniently use it for unblocking SIGCHLD rather than having to
reinvent it in pty.c.

[originally from svn r5006]
This commit is contained in:
Simon Tatham
2004-12-17 14:25:53 +00:00
parent d649075539
commit b3b70d749f
4 changed files with 20 additions and 21 deletions

View File

@ -621,18 +621,13 @@ static const char *pty_init(void *frontend, void **backend_handle, Config *cfg,
/*
* SIGINT and SIGQUIT may have been set to ignored by our
* parent, particularly by things like sh -c 'pterm &' and
* some window managers. SIGCHLD, meanwhile, has been
* tinkered with by the watchdog process. Reverse all this
* for our child process.
* some window managers. SIGCHLD, meanwhile, was blocked
* during pt_main() startup. Reverse all this for our child
* process.
*/
putty_signal(SIGINT, SIG_DFL);
putty_signal(SIGQUIT, SIG_DFL);
{
sigset_t set;
sigemptyset(&set);
sigaddset(&set, SIGCHLD);
sigprocmask(SIG_UNBLOCK, &set, NULL);
}
block_signal(SIGCHLD, 0);
if (pty_argv)
execvp(pty_argv[0], pty_argv);
else {