summaryrefslogtreecommitdiffstats
path: root/libc/stdlib/abort.c
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-12-03 14:04:03 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-12-03 14:04:03 +0000
commitd5c32667ad11ff38dc46be527266297b38a341d1 (patch)
treeb3ce68f179d97e6e25e5c8e7ace845c4a561322b /libc/stdlib/abort.c
parent329ef3196b396a70eecd5a4789845d368b488ab7 (diff)
downloaduClibc-alpine-d5c32667ad11ff38dc46be527266297b38a341d1.tar.bz2
uClibc-alpine-d5c32667ad11ff38dc46be527266297b38a341d1.tar.xz
Synch with trunk @ 24242
Step 18: some more synch: hidden_proto, size reduction and signal handling changes.
Diffstat (limited to 'libc/stdlib/abort.c')
-rw-r--r--libc/stdlib/abort.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libc/stdlib/abort.c b/libc/stdlib/abort.c
index 7291d0ea4..fcf90187c 100644
--- a/libc/stdlib/abort.c
+++ b/libc/stdlib/abort.c
@@ -60,9 +60,9 @@ void abort(void)
__UCLIBC_MUTEX_LOCK_CANCEL_UNSAFE(mylock);
/* Unmask SIGABRT to be sure we can get it */
- if (__sigemptyset(&sigs) == 0 && __sigaddset(&sigs, SIGABRT) == 0) {
- sigprocmask(SIG_UNBLOCK, &sigs, (sigset_t *) NULL);
- }
+ __sigemptyset(&sigs);
+ __sigaddset(&sigs, SIGABRT);
+ sigprocmask(SIG_UNBLOCK, &sigs, NULL);
while (1) {
/* Try to suicide with a SIGABRT */
@@ -91,9 +91,9 @@ abort_it:
been_there_done_that++;
memset(&act, '\0', sizeof(struct sigaction));
- act.sa_handler = SIG_DFL;
+ if (SIG_DFL) /* if it's constant zero, already done */
+ act.sa_handler = SIG_DFL;
__sigfillset(&act.sa_mask);
- act.sa_flags = 0;
sigaction(SIGABRT, &act, NULL);
goto abort_it;