From e7906ce8f2f1ab41027290746c9bf664ddc61457 Mon Sep 17 00:00:00 2001 From: guenther <> Date: Fri, 23 Oct 2015 04:39:24 +0000 Subject: [PATCH] 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@ --- src/lib/libc/stdlib/abort.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/libc/stdlib/abort.c b/src/lib/libc/stdlib/abort.c index 903bfa78..710cd7da 100644 --- a/src/lib/libc/stdlib/abort.c +++ b/src/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); }