summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/abort.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2015-10-23 04:39:24 +0000
committerguenther <guenther@openbsd.org>2015-10-23 04:39:24 +0000
commit5aed4d28d43eadb2b7771720ac4d094bec87d515 (patch)
tree6c6370b3671a68ee33887680016e857bac5c0107 /lib/libc/stdlib/abort.c
parentpledge "stdio rpath getpw proc exec id" at start, much like doas. (diff)
downloadwireguard-openbsd-5aed4d28d43eadb2b7771720ac4d094bec87d515.tar.xz
wireguard-openbsd-5aed4d28d43eadb2b7771720ac4d094bec87d515.zip
Merge the sigaction() and sigprocmask() overloads/wrappers from libpthread
into libc, and move pthread_sigmask() as well (just a trivial wrapper). This provides consistent handling of SIGTHR between single- and multi-threaded programs and is a step in the merge of all the libpthread overloads, providing some ASM and Makefile bits that the other wrappers will need. ok deraadt@ millert@
Diffstat (limited to 'lib/libc/stdlib/abort.c')
-rw-r--r--lib/libc/stdlib/abort.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/stdlib/abort.c b/lib/libc/stdlib/abort.c
index 903bfa78e18..710cd7da478 100644
--- a/lib/libc/stdlib/abort.c
+++ b/lib/libc/stdlib/abort.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: abort.c,v 1.18 2015/09/13 08:31:47 guenther Exp $ */
+/* $OpenBSD: abort.c,v 1.19 2015/10/23 04:39:24 guenther Exp $ */
/*
* Copyright (c) 1985 Regents of the University of California.
* All rights reserved.
@@ -34,7 +34,6 @@
#include "thread_private.h"
#include "atexit.h"
-int _thread_sys_sigprocmask(int, const sigset_t *, sigset_t *);
void
abort(void)
@@ -48,7 +47,7 @@ abort(void)
* any errors -- X311J doesn't allow abort to return anyway.
*/
sigdelset(&mask, SIGABRT);
- (void)_thread_sys_sigprocmask(SIG_SETMASK, &mask, (sigset_t *)NULL);
+ (void)sigprocmask(SIG_SETMASK, &mask, NULL);
(void)raise(SIGABRT);
@@ -57,7 +56,7 @@ abort(void)
* it again, only harder.
*/
(void)signal(SIGABRT, SIG_DFL);
- (void)_thread_sys_sigprocmask(SIG_SETMASK, &mask, (sigset_t *)NULL);
+ (void)sigprocmask(SIG_SETMASK, &mask, NULL);
(void)raise(SIGABRT);
_exit(1);
}