From 3571511798825ba0a4466589388be54e41b98488 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 29 Jun 2005 00:20:39 +0000 Subject: 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 --- libc/stdlib/abort.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libc/stdlib/abort.c') 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; } } - -- cgit v1.2.3