summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2012-11-10 03:51:41 +0000
committerguenther <guenther@openbsd.org>2012-11-10 03:51:41 +0000
commit85b0c6cee8c60e9b60458453a25e578ccbc9af30 (patch)
tree76edafd8c6d189f7e52eabd1d04ebef9412f7a60 /lib/libc/gen
parentPer POSIX, fix raise() and abort() to send the signal to the current thread. (diff)
downloadwireguard-openbsd-85b0c6cee8c60e9b60458453a25e578ccbc9af30.tar.xz
wireguard-openbsd-85b0c6cee8c60e9b60458453a25e578ccbc9af30.zip
raise() sends the signal to the current thread and only one error can occur.
ok jmc@
Diffstat (limited to 'lib/libc/gen')
-rw-r--r--lib/libc/gen/raise.327
1 files changed, 13 insertions, 14 deletions
diff --git a/lib/libc/gen/raise.3 b/lib/libc/gen/raise.3
index 634eb08e055..abb9738bdcb 100644
--- a/lib/libc/gen/raise.3
+++ b/lib/libc/gen/raise.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: raise.3,v 1.8 2007/05/31 19:19:28 jmc Exp $
+.\" $OpenBSD: raise.3,v 1.9 2012/11/10 03:51:41 guenther Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -31,12 +31,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: November 10 2012 $
.Dt RAISE 3
.Os
.Sh NAME
.Nm raise
-.Nd send a signal to the current process
+.Nd send a signal to the current thread
.Sh SYNOPSIS
.Fd #include <signal.h>
.Ft int
@@ -46,27 +46,26 @@ The
.Fn raise
function sends the signal
.Fa sig
-to the current process.
+to the current thread.
.Sh RETURN VALUES
Upon successful completion, a value of 0 is returned.
Otherwise, a value of \-1 is returned and the global variable
.Va errno
is set to indicate the error.
.Sh ERRORS
-The
.Fn raise
-function may fail and set
-.Va errno
-for any of the errors specified for the
-library functions
-.Xr getpid 2
-and
-.Xr kill 2 .
+will fail and no signal will be sent if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+.Fa sig
+is not a valid signal number.
+.El
.Sh SEE ALSO
-.Xr getpid 2 ,
.Xr kill 2
.Sh STANDARDS
The
.Fn raise
function conforms to
-.St -ansiC .
+.St -ansiC
+and
+.St -p1003.1-2008 .