3 wait \- check child process status
7 int \fBwait_nohang\fP(&\fIwstat\fR);
9 int \fBwait_stop\fP(&\fIwstat\fR);
11 int \fBwait_stopnohang\fP(&\fIwstat\fR);
13 int \fBwait_pid\fP(&\fIwstat\fR,\fIpid\fR);
15 int \fBwait_exitcode\fP(\fIwstat\fR);
17 int \fBwait_crashed\fP(\fIwstat\fR);
19 int \fBwait_stopped\fP(\fIwstat\fR);
21 int \fBwait_stopsig\fP(\fIwstat\fR);
28 looks for zombies (child processes that have exited).
30 it eliminates the zombie,
31 puts the zombie's exit status into
33 and returns the zombie's process ID.
34 If there are several zombies,
37 If there are children but no zombies,
40 If there are no children,
50 but it also looks for children that have stopped.
55 but if there are children it will pause waiting for one of them
59 waits for child process
62 It eliminates any zombie that shows up in the meantime,
63 discarding the exit status.
75 is the signal that caused the child to stop.
77 If the child exited by crashing,
83 If the child exited normally,
90 is the child's exit code.