-.\" $OpenBSD: waitid.2,v 1.1 2022/12/19 18:13:50 guenther Exp $
+.\" $OpenBSD: waitid.2,v 1.2 2022/12/20 09:01:05 jmc Exp $
.\" $NetBSD: wait.2,v 1.6 1995/02/27 12:39:37 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993, 1994
.\"
.\" @(#)wait.2 8.2 (Berkeley) 4/19/94
.\"
-.Dd $Mdocdate: December 19 2022 $
+.Dd $Mdocdate: December 20 2022 $
.Dt WAITID 2
.Os
.Sh NAME
.Fa idtype
and
.Fa id .
-.Bl -bullet -offset indent
+.Bl -dash -offset indent
.It
If
.Fa idtype
.Dv SIGCONT
signal.
.It Dv WEXITED
-Report the status of selected processes which have terminated.
+Reports the status of selected processes which have terminated.
.It Dv WNOHANG
Indicates that the call should not block if there are no selected processes
that have a status change to report.
.It Dv WNOWAIT
-Keep the process whose status is returned in a waitable state.
+Keeps the process whose status is returned in a waitable state.
The process may be waited for again after this call completes.
.It Dv WSTOPPED
-Report the status of selected processes which are stopped due to a
+Reports the status of selected processes which are stopped due to a
.Dv SIGTTIN , SIGTTOU , SIGTSTP ,
or
.Dv SIGSTOP
signal.
.It Dv WTRAPPED
-Report the status of selected processes which are stopped due to a
+Reports the status of selected processes which are stopped due to a
process tracing event
.Xr ( ptrace 2 ) .
.El
.Fa infop
is filled with the status of the process:
.Fa si_signo
-will be set to
+is set to
.Dv SIGCHLD ,
+and
.Fa si_pid
and
.Fa si_uid
-to the process ID and effective user ID of the matched process.
+are set to the process ID and effective user ID of the matched process.
.Fa si_code
will be set to one of the following values:
.Bl -tag -width "CLD_CONTINUED"
and
.Fa si_pid
will be set to zero.
-.Sh NOTES
-See
-.Xr sigaction 2
-for a list of termination signals.
-A status of 0 indicates normal termination.
-.Pp
-If a parent process terminates without
-waiting for all of its child processes to terminate,
-the remaining child processes are assigned the parent
-process 1 ID (the init process ID).
-.Pp
-If a signal is caught while a
-.Fn waitid
-call is pending, the call may be interrupted or restarted when the
-signal-catching routine returns, depending on the options in effect
-for the signal; for further information, see
-.Xr siginterrupt 3 .
.Sh RETURN VALUES
If
.Fn waitid