summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1994-04-06 01:17:43 +0000
committerRoland McGrath <roland@redhat.com>1994-04-06 01:17:43 +0000
commitfd025b90899a09cb861c67d3aee8a981d8b7af04 (patch)
treeeb1fdafdeae38db24355fa697afdf15cda8f5a1f
parent6dc8e442f2636dedc1808a69c838638186050e64 (diff)
downloadgunmake-fd025b90899a09cb861c67d3aee8a981d8b7af04.tar.gz
(fatal_error_signal): Don't unblock signals.
-rw-r--r--commands.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/commands.c b/commands.c
index 696ca68..d575b0c 100644
--- a/commands.c
+++ b/commands.c
@@ -331,18 +331,9 @@ fatal_error_signal (sig)
{
handling_fatal_signal = 1;
+ /* Set the handling for this signal to the default.
+ It is blocked now while we run this handler. */
signal (sig, SIG_DFL);
-#ifdef POSIX
- {
- sigset_t set;
- sigemptyset (&set);
- (void) sigprocmask (SIG_SETMASK, &set, (sigset_t *) 0);
- }
-#else
-#ifdef HAVE_SIGSETMASK
- (void) sigsetmask (0);
-#endif
-#endif
/* A termination signal won't be sent to the entire
process group, but it means we want to kill the children. */
@@ -390,9 +381,9 @@ fatal_error_signal (sig)
cause a core dump. Just exit instead. */
exit (1);
- /* Signal the same code; this time it will really be fatal. */
+ /* Signal the same code; this time it will really be fatal. The signal
+ will be unblocked when we return and arrive then to kill us. */
if (kill (getpid (), sig) < 0)
- /* It shouldn't return, but if it does, die anyway. */
pfatal_with_name ("kill");
}