diff options
author | Bryce McKinlay <bryce@albatross.co.nz> | 1999-12-24 01:08:34 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 1999-12-24 01:08:34 +0000 |
commit | 54f76845c5bec7392c5ba95a4a1a9df38b980715 (patch) | |
tree | 6266c2f2f127c1ae587f061144542fbea3ecdc9d | |
parent | 43cbc9430d557a3219ff833751c38132f831036e (diff) | |
download | gcc-54f76845c5bec7392c5ba95a4a1a9df38b980715.zip gcc-54f76845c5bec7392c5ba95a4a1a9df38b980715.tar.gz gcc-54f76845c5bec7392c5ba95a4a1a9df38b980715.tar.bz2 |
linux_threads.c: Don't block SIGINT, SIGQUIT, SIGTERM in the NO_SIGNALS case.
1999-12-22 Bryce McKinlay <bryce@albatross.co.nz>
* linux_threads.c: Don't block SIGINT, SIGQUIT, SIGTERM in the
NO_SIGNALS case.
From-SVN: r31083
-rw-r--r-- | boehm-gc/ChangeLog | 5 | ||||
-rw-r--r-- | boehm-gc/linux_threads.c | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index f367b2c0..5e39dd0 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,8 @@ +1999-12-22 Bryce McKinlay <bryce@albatross.co.nz> + + * linux_threads.c: Don't block SIGINT, SIGQUIT, SIGTERM in the + NO_SIGNALS case. + 1999-12-19 Jeff Sturm <jsturm@sigma6.com> * gcconfig.h: Define DATASTART for Alpha Linux. diff --git a/boehm-gc/linux_threads.c b/boehm-gc/linux_threads.c index 8287dce..4d98062 100644 --- a/boehm-gc/linux_threads.c +++ b/boehm-gc/linux_threads.c @@ -173,6 +173,11 @@ void GC_suspend_handler(int sig) /* is no race. */ if (sigfillset(&mask) != 0) ABORT("sigfillset() failed"); if (sigdelset(&mask, SIG_RESTART) != 0) ABORT("sigdelset() failed"); +#ifdef NO_SIGNALS + if (sigdelset(&mask, SIGINT) != 0) ABORT("sigdelset() failed"); + if (sigdelset(&mask, SIGQUIT) != 0) ABORT("sigdelset() failed"); + if (sigdelset(&mask, SIGTERM) != 0) ABORT("sigdelset() failed"); +#endif do { me->signal = 0; sigsuspend(&mask); /* Wait for signal */ @@ -433,6 +438,21 @@ void GC_thr_init() if (sigfillset(&act.sa_mask) != 0) { ABORT("sigfillset() failed"); } + +#ifdef NO_SIGNALS + if (sigdelset(&act.sa_mask, SIGINT) != 0) { + ABORT("sigdelset() failed"); + } + + if (sigdelset(&act.sa_mask, SIGQUIT) != 0) { + ABORT("sigdelset() failed"); + } + + if (sigdelset(&act.sa_mask, SIGTERM) != 0) { + ABORT("sigdelset() failed"); + } +#endif + /* SIG_RESTART is unmasked by the handler when necessary. */ act.sa_handler = GC_suspend_handler; if (sigaction(SIG_SUSPEND, &act, NULL) != 0) { |