]> granicus.if.org Git - gc/commitdiff
1999-12-22 Bryce McKinlay <bryce@albatross.co.nz>
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Dec 1999 01:08:34 +0000 (01:08 +0000)
committerguest <ivmai@mail.ru>
Fri, 29 Jul 2011 06:54:18 +0000 (10:54 +0400)
        * linux_threads.c: Don't block SIGINT, SIGQUIT, SIGTERM in the
        NO_SIGNALS case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31083 138bc75d-0d04-0410-961f-82ee72b054a4

ChangeLog
linux_threads.c

index f367b2c0865bd416b7a58c937f4ee5738fe0ed1f..5e39dd057788f29476129391fcd43e5bf77f3302 100644 (file)
--- a/ChangeLog
+++ b/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.
index 8287dce647b1413250261ef06bbe4479a9446618..4d98062d11c985f4e856e10cd41a9b6a902e2072 100644 (file)
@@ -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) {