diff options
author | Roland McGrath <roland@redhat.com> | 1992-04-30 22:17:12 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1992-04-30 22:17:12 +0000 |
commit | 9edeb3ad8ee15ca89cec7f0d7ec08dc630036efb (patch) | |
tree | 2444279b53a6182c2a1875aad21068664681dd82 /main.c | |
parent | 56f17eb65983e17a3090e4871fcafa474b3bc9b3 (diff) | |
download | gunmake-9edeb3ad8ee15ca89cec7f0d7ec08dc630036efb.tar.gz |
Formerly main.c.~38~
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -268,7 +268,14 @@ struct file *default_goal_file; struct file *default_file; /* Mask of signals that are being caught with fatal_error_signal. */ + +#ifdef POSIX +sigset_t fatal_signal_set; +#else +#ifndef USG int fatal_signal_mask; +#endif +#endif int main (argc, argv, envp) @@ -299,14 +306,24 @@ main (argc, argv, envp) init_siglist (); #endif +#ifdef POSIX + sigemptyset (&fatal_signal_set); +#define ADD_SIG(sig) sigaddset (sig, &fatal_signal_set) +#else +#ifndef USG fatal_signal_mask = 0; +#define ADD_SIG(sig) fatal_signal_mask |= sigmask (sig) +#else +#define ADD_SIG(sig) +#endif +#endif #define FATAL_SIG(sig) \ if (SIGNAL ((sig), (SIGHANDLER) fatal_error_signal) \ == (SIGHANDLER) SIG_IGN) \ (void) SIGNAL ((sig), SIG_IGN); \ else \ - fatal_signal_mask |= sigmask (sig); + ADD_SIG (sig); FATAL_SIG (SIGHUP); FATAL_SIG (SIGQUIT); |