diff options
author | 2015-10-11 09:51:26 +0000 | |
---|---|---|
committer | 2015-10-11 09:51:26 +0000 | |
commit | 93024534bb8508f1ab1cee1f3713f250b46dae6e (patch) | |
tree | 189519d38f46336fff0155fec8adb800e8fd750c /lib/libc/sys | |
parent | Prefer .Fa over .Em for struct members (diff) | |
download | wireguard-openbsd-93024534bb8508f1ab1cee1f3713f250b46dae6e.tar.xz wireguard-openbsd-93024534bb8508f1ab1cee1f3713f250b46dae6e.zip |
Document that execve(2) resets SIGCHLD to SIG_DFL
wordsmithing and ok jmc@
Diffstat (limited to 'lib/libc/sys')
-rw-r--r-- | lib/libc/sys/execve.2 | 20 | ||||
-rw-r--r-- | lib/libc/sys/sigaction.2 | 9 |
2 files changed, 21 insertions, 8 deletions
diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2 index 0a9693728a2..53d3a2be848 100644 --- a/lib/libc/sys/execve.2 +++ b/lib/libc/sys/execve.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: execve.2,v 1.46 2015/09/10 17:55:21 schwarze Exp $ +.\" $OpenBSD: execve.2,v 1.47 2015/10/11 09:51:26 guenther Exp $ .\" $NetBSD: execve.2,v 1.9 1995/02/27 12:32:25 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)execve.2 8.3 (Berkeley) 1/24/94 .\" -.Dd $Mdocdate: September 10 2015 $ +.Dd $Mdocdate: October 11 2015 $ .Dt EXECVE 2 .Os .Sh NAME @@ -121,10 +121,13 @@ some system file like The intent is to ensure these descriptors are not unallocated, since many libraries make assumptions about the use of these 3 file descriptors. .Pp -Signals set to be ignored in the calling process are set to be ignored in +Signals set to be ignored in the calling process, +with the exception of +.Dv SIGCHLD , +are set to be ignored in the new process. -Signals which are set to be caught in the calling process image +Other signals are set to default action in the new process image. Blocked signals remain blocked regardless of changes to the signal action. The signal stack is reset to be undefined (see @@ -323,3 +326,12 @@ to a non-superuser, but is executed when the real is .Dq root , then the process has some of the powers of a superuser as well. +.Pp +.St -p1003.1-2008 +permits +.Nm +to leave +.Dv SIGCHLD +as ignored in the new process; portable programs cannot rely on +.Nm +resetting it to the default disposition. diff --git a/lib/libc/sys/sigaction.2 b/lib/libc/sys/sigaction.2 index ce4dfd52968..c33a6bd81bd 100644 --- a/lib/libc/sys/sigaction.2 +++ b/lib/libc/sys/sigaction.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sigaction.2,v 1.71 2015/10/11 07:53:49 guenther Exp $ +.\" $OpenBSD: sigaction.2,v 1.72 2015/10/11 09:51:26 guenther Exp $ .\" $NetBSD: sigaction.2,v 1.7 1995/10/12 15:41:16 jtc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 @@ -289,9 +289,10 @@ and the restart/interrupt flags are inherited by the child. .Pp .Xr execve 2 reinstates the default -action for all signals which were caught and -resets all signals to be caught on the user stack. -Ignored signals remain ignored; +action for +.Dv SIGCHLD +and all signals which were caught; all other signals remain ignored. +All signals are reset to be caught on the user stack and the signal mask remains the same; signals that restart pending system calls continue to do so. .Pp |