mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-26 01:32:25 +00:00
Apparently SIGCHLD is blocked by default in processes run in a
pterm, which was breaking my bash job notification patch. This is apparently not the case for xterm, so I've fiddled with it. Not entirely sure _why_ it did this in the first place, but there we go. [originally from svn r4997]
This commit is contained in:
parent
6c81ee6706
commit
ebf507497d
10
unix/pty.c
10
unix/pty.c
@ -621,10 +621,18 @@ static const char *pty_init(void *frontend, void **backend_handle, Config *cfg,
|
|||||||
/*
|
/*
|
||||||
* SIGINT and SIGQUIT may have been set to ignored by our
|
* SIGINT and SIGQUIT may have been set to ignored by our
|
||||||
* parent, particularly by things like sh -c 'pterm &' and
|
* parent, particularly by things like sh -c 'pterm &' and
|
||||||
* some window managers. Reverse this for our child process.
|
* some window managers. SIGCHLD, meanwhile, has been
|
||||||
|
* tinkered with by the watchdog process. Reverse all this
|
||||||
|
* for our child process.
|
||||||
*/
|
*/
|
||||||
putty_signal(SIGINT, SIG_DFL);
|
putty_signal(SIGINT, SIG_DFL);
|
||||||
putty_signal(SIGQUIT, SIG_DFL);
|
putty_signal(SIGQUIT, SIG_DFL);
|
||||||
|
{
|
||||||
|
sigset_t set;
|
||||||
|
sigemptyset(&set);
|
||||||
|
sigaddset(&set, SIGCHLD);
|
||||||
|
sigprocmask(SIG_UNBLOCK, &set, NULL);
|
||||||
|
}
|
||||||
if (pty_argv)
|
if (pty_argv)
|
||||||
execvp(pty_argv[0], pty_argv);
|
execvp(pty_argv[0], pty_argv);
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user