1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-25 01:02:24 +00:00

Make sure SIGINT and SIGQUIT haven't been nobbled in our child

process by weird POSIX-required shell behaviour.

[originally from svn r2110]
This commit is contained in:
Simon Tatham 2002-10-21 23:01:34 +00:00
parent 068da38044
commit 45c494ff9d

View File

@ -451,6 +451,13 @@ static char *pty_init(char *host, int port, char **realhost, int nodelay)
sprintf(term_env_var, "TERM=%s", cfg.termtype);
putenv(term_env_var);
}
/*
* SIGINT and SIGQUIT may have been set to ignored by our
* parent, particularly by things like sh -c 'pterm &' and
* some window managers. Reverse this for our child process.
*/
signal(SIGINT, SIG_DFL);
signal(SIGQUIT, SIG_DFL);
if (pty_argv)
execvp(pty_argv[0], pty_argv);
else {