summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1992-04-30 22:17:12 +0000
committerRoland McGrath <roland@redhat.com>1992-04-30 22:17:12 +0000
commit9edeb3ad8ee15ca89cec7f0d7ec08dc630036efb (patch)
tree2444279b53a6182c2a1875aad21068664681dd82 /main.c
parent56f17eb65983e17a3090e4871fcafa474b3bc9b3 (diff)
downloadgunmake-9edeb3ad8ee15ca89cec7f0d7ec08dc630036efb.tar.gz
Formerly main.c.~38~
Diffstat (limited to 'main.c')
-rw-r--r--main.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/main.c b/main.c
index e82d068..2a835ea 100644
--- a/main.c
+++ b/main.c
@@ -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);