From ca456fbba33d00a12bcec06589a08a4e9a081afd Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 25 Apr 2019 20:29:54 +0100 Subject: 44284: Mark SIGQUIT as ignore if ignored on entry to shell. This prevents us from re-enabling it after a fork if it is being ignored. --- Src/init.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Src/init.c') diff --git a/Src/init.c b/Src/init.c index e7e62e2f7..2d5c3296d 100644 --- a/Src/init.c +++ b/Src/init.c @@ -1234,6 +1234,15 @@ init_signals(void) intr(); +#ifdef POSIX_SIGNALS + { + struct sigaction act; + if (!sigaction(SIGQUIT, NULL, &act) && + act.sa_handler == SIG_IGN) + sigtrapped[SIGQUIT] = ZSIG_IGNORED; + } +#endif + #ifndef QDEBUG signal_ignore(SIGQUIT); #endif -- cgit 1.4.1