From 8bf5c4190a58dcafed54ea311b274f633475c5ef Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 21 Oct 2002 23:01:34 +0000 Subject: [PATCH] Make sure SIGINT and SIGQUIT haven't been nobbled in our child process by weird POSIX-required shell behaviour. git-svn-id: svn://svn.tartarus.org/sgt/putty@2110 cda61777-01e9-0310-a592-d414129be87e --- unix/pty.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/unix/pty.c b/unix/pty.c index 43923e93..3fd8b3f9 100644 --- a/unix/pty.c +++ b/unix/pty.c @@ -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 { -- 2.11.0