summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libc/stdlib/abort.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib/abort.c b/src/lib/libc/stdlib/abort.c
index 244e3b28aa..4c8dc70a1d 100644
--- a/src/lib/libc/stdlib/abort.c
+++ b/src/lib/libc/stdlib/abort.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: abort.c,v 1.15 2007/09/03 14:40:16 millert Exp $ */ 1/* $OpenBSD: abort.c,v 1.16 2012/11/10 03:46:11 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 1985 Regents of the University of California. 3 * Copyright (c) 1985 Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -34,6 +34,8 @@
34#include "thread_private.h" 34#include "thread_private.h"
35#include "atexit.h" 35#include "atexit.h"
36 36
37int _thread_sys_sigprocmask(int, const sigset_t *, sigset_t *);
38
37void 39void
38abort(void) 40abort(void)
39{ 41{
@@ -65,7 +67,7 @@ abort(void)
65 } 67 }
66 } 68 }
67 69
68 (void)kill(getpid(), SIGABRT); 70 (void)raise(SIGABRT);
69 71
70 /* 72 /*
71 * if SIGABRT ignored, or caught and the handler returns, do 73 * if SIGABRT ignored, or caught and the handler returns, do
@@ -73,6 +75,6 @@ abort(void)
73 */ 75 */
74 (void)signal(SIGABRT, SIG_DFL); 76 (void)signal(SIGABRT, SIG_DFL);
75 (void)_thread_sys_sigprocmask(SIG_SETMASK, &mask, (sigset_t *)NULL); 77 (void)_thread_sys_sigprocmask(SIG_SETMASK, &mask, (sigset_t *)NULL);
76 (void)kill(getpid(), SIGABRT); 78 (void)raise(SIGABRT);
77 _exit(1); 79 _exit(1);
78} 80}