summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2017-05-05 15:48:50 +0000
committermillert <millert@openbsd.org>2017-05-05 15:48:50 +0000
commitec39cc2d1811c0ec96c19a73d1405e01b7ade000 (patch)
tree01967c097e19f2dd77f30274fc02addadc6609ea
parentAdd glue to attach SDHC compliant controllers using the FDT. This makes (diff)
downloadwireguard-openbsd-ec39cc2d1811c0ec96c19a73d1405e01b7ade000.tar.xz
wireguard-openbsd-ec39cc2d1811c0ec96c19a73d1405e01b7ade000.zip
Document what happens when sending a signal to the calling process.
OK jmc@
-rw-r--r--lib/libc/sys/kill.223
1 files changed, 20 insertions, 3 deletions
diff --git a/lib/libc/sys/kill.2 b/lib/libc/sys/kill.2
index 152012c6163..c4947e9b9dd 100644
--- a/lib/libc/sys/kill.2
+++ b/lib/libc/sys/kill.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: kill.2,v 1.23 2015/11/02 17:32:54 deraadt Exp $
+.\" $OpenBSD: kill.2,v 1.24 2017/05/05 15:48:50 millert Exp $
.\" $NetBSD: kill.2,v 1.7 1995/02/27 12:33:53 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)kill.2 8.3 (Berkeley) 4/19/94
.\"
-.Dd $Mdocdate: November 2 2015 $
+.Dd $Mdocdate: May 5 2017 $
.Dt KILL 2
.Os
.Sh NAME
@@ -89,6 +89,23 @@ with the same uid as the user excluding the process sending the signal.
No error is returned if any process could be signaled.
.El
.Pp
+If the value of
+.Fa pid
+causes
+.Fa sig
+to be sent to the calling process, either
+.Fa sig
+or at least one pending unblocked signal will be delivered before
+.Fn kill
+returns unless
+.Fa sig
+is blocked in the calling thread,
+.Fa sig
+is unblocked in another thread, or another thread is waiting for
+.Fa sig
+in
+.Fn sigwait .
+.Pp
Setuid and setgid processes are dealt with slightly differently.
For the non-root user, to prevent attacks against such processes, some signal
deliveries are not permitted and return the error
@@ -138,7 +155,7 @@ of the group could be signaled.
.Sh STANDARDS
The
.Fn kill
-function is expected to conform to
+function conforms to
.St -p1003.1-2008 .
.Sh HISTORY
The