.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\" @(#)wait3.2j 4.1 (Berkeley) %G%
wait3 \- wait for process to terminate
.B "#include <sys/vtimes.h>"
.B wait3(status, options, vtimep)
.B struct vtimes *vtimep;
words are described by definitions and macros in the file
<wait.h>; the union and its bitfield definitions and associated
macros given there provide
convenient and mnemonic access to the word of status returned by a
See this file for more information.
The first is WNOHANG which causes the
to not hang if there are no
processes which wish to report status, rather returning a pid of 0 in this
case as the result of the
The second option is WUNTRACED which causes
to return information when children of the current process which are
stopped but not traced (with
because they received a SIGTTIN, SIGTTOU, SIGTSTP or SIGSTOP signal.
for a description of these signals.
pointer is an optional structure where a
structure is returned describing the resources used by the terminated
process and all its children. This may be given as \*(lq0\*(rq if the
information is not desired. Currently this information is not available
wait(2), exit(2), fork(2), sigsys(2)
\-1 if there are no children not previously waited for, or 0 if the WNOHANG
option is given and there are no stopped or exited children.
This call is peculiar to this version of UNIX.
The options and specifications of this system call and even the call itself
are subject to change. It may be replaced by other facilities in future