mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
43cbc9430d
commit
54f76845c5
|
|
@ -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>
|
1999-12-19 Jeff Sturm <jsturm@sigma6.com>
|
||||||
|
|
||||||
* gcconfig.h: Define DATASTART for Alpha Linux.
|
* gcconfig.h: Define DATASTART for Alpha Linux.
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,11 @@ void GC_suspend_handler(int sig)
|
||||||
/* is no race. */
|
/* is no race. */
|
||||||
if (sigfillset(&mask) != 0) ABORT("sigfillset() failed");
|
if (sigfillset(&mask) != 0) ABORT("sigfillset() failed");
|
||||||
if (sigdelset(&mask, SIG_RESTART) != 0) ABORT("sigdelset() 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 {
|
do {
|
||||||
me->signal = 0;
|
me->signal = 0;
|
||||||
sigsuspend(&mask); /* Wait for signal */
|
sigsuspend(&mask); /* Wait for signal */
|
||||||
|
|
@ -433,6 +438,21 @@ void GC_thr_init()
|
||||||
if (sigfillset(&act.sa_mask) != 0) {
|
if (sigfillset(&act.sa_mask) != 0) {
|
||||||
ABORT("sigfillset() failed");
|
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. */
|
/* SIG_RESTART is unmasked by the handler when necessary. */
|
||||||
act.sa_handler = GC_suspend_handler;
|
act.sa_handler = GC_suspend_handler;
|
||||||
if (sigaction(SIG_SUSPEND, &act, NULL) != 0) {
|
if (sigaction(SIG_SUSPEND, &act, NULL) != 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue