diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-06-29 00:20:39 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-06-29 00:20:39 +0000 |
commit | 3571511798825ba0a4466589388be54e41b98488 (patch) | |
tree | 767fde2e0878f51fd71320a3b60249dfe88c1e61 /libc | |
parent | 8ef541433275e7ad2dd93dd2de07239541df62a9 (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
Diffstat (limited to 'libc')
-rw-r--r-- | libc/stdlib/abort.c | 4 |
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; } } - |