summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-06-29 00:20:39 +0000
committerMike Frysinger <vapier@gentoo.org>2005-06-29 00:20:39 +0000
commit3571511798825ba0a4466589388be54e41b98488 (patch)
tree767fde2e0878f51fd71320a3b60249dfe88c1e61
parent8ef541433275e7ad2dd93dd2de07239541df62a9 (diff)
if we have a signal handler in place to cover SIGABRT, we have to make sure the code that unregisters it raises SIGABRT again so the program actually aborts
-rw-r--r--libc/stdlib/abort.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/stdlib/abort.c b/libc/stdlib/abort.c
index e34c86778..74b0dca50 100644
--- a/libc/stdlib/abort.c
+++ b/libc/stdlib/abort.c
@@ -90,6 +90,7 @@ void abort(void)
/* Try to suicide with a SIGABRT. */
if (been_there_done_that == 0) {
been_there_done_that++;
+abort_it:
UNLOCK;
raise(SIGABRT);
LOCK;
@@ -105,6 +106,8 @@ void abort(void)
__sigfillset (&act.sa_mask);
act.sa_flags = 0;
sigaction (SIGABRT, &act, NULL);
+
+ goto abort_it;
}
/* Still here? Try to suicide with an illegal instruction */
@@ -125,4 +128,3 @@ void abort(void)
ABORT_INSTRUCTION;
}
}
-