-.\" $OpenBSD: signal.3,v 1.53 2015/05/12 02:44:06 guenther Exp $
+.\" $OpenBSD: signal.3,v 1.54 2015/10/11 09:51:26 guenther Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: May 12 2015 $
+.Dd $Mdocdate: October 11 2015 $
.Dt SIGNAL 3
.Os
.Sh NAME
.Pp
When a process which has installed signal handlers forks,
the child process inherits the signals.
-All caught signals may be reset to their default action by a call
+All caught signals, as well as
+.Dv SIGCHLD ,
+are reset to their default action by a call
to the
.Xr execve 2
function;
+other
ignored signals remain ignored.
.Pp
The following functions are either reentrant or not interruptible
-.\" $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
.\"
.\" @(#)execve.2 8.3 (Berkeley) 1/24/94
.\"
-.Dd $Mdocdate: September 10 2015 $
+.Dd $Mdocdate: October 11 2015 $
.Dt EXECVE 2
.Os
.Sh NAME
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
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.
-.\" $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
.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