diff options
author | 2015-10-23 04:39:24 +0000 | |
---|---|---|
committer | 2015-10-23 04:39:24 +0000 | |
commit | 5aed4d28d43eadb2b7771720ac4d094bec87d515 (patch) | |
tree | 6c6370b3671a68ee33887680016e857bac5c0107 /lib/libc/gen/siginterrupt.c | |
parent | pledge "stdio rpath getpw proc exec id" at start, much like doas. (diff) | |
download | wireguard-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/gen/siginterrupt.c')
-rw-r--r-- | lib/libc/gen/siginterrupt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/gen/siginterrupt.c b/lib/libc/gen/siginterrupt.c index ed23687b697..b6725a6d7b6 100644 --- a/lib/libc/gen/siginterrupt.c +++ b/lib/libc/gen/siginterrupt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siginterrupt.c,v 1.7 2015/09/09 16:10:03 guenther Exp $ */ +/* $OpenBSD: siginterrupt.c,v 1.8 2015/10/23 04:39:24 guenther Exp $ */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -40,7 +40,7 @@ siginterrupt(int sig, int flag) struct sigaction sa; int ret; - if ((ret = sigaction(sig, (struct sigaction *)0, &sa)) < 0) + if ((ret = WRAP(sigaction)(sig, NULL, &sa)) < 0) return (ret); if (flag) { sigaddset(&__sigintr, sig); @@ -49,5 +49,5 @@ siginterrupt(int sig, int flag) sigdelset(&__sigintr, sig); sa.sa_flags |= SA_RESTART; } - return (sigaction(sig, &sa, (struct sigaction *)0)); + return (sigaction(sig, &sa, NULL)); } |