WAIT3(2J) UNIX Programmer's Manual WAIT3(2J) NAME wait3 - wait for process to terminate SYNOPSIS #include <wait.h> #include <sys/vtimes.h> wait3(status, options, vtimep) union wait status; int options; struct vtimes *vtimep; cc ... -ljobs DESCRIPTION The _s_t_a_t_u_s and _o_p_t_i_o_n words are described by definitions and macros in the file <wait.h>; the union and its bitfield definitions and associated macros given there provide con- venient and mnemonic access to the word of status returned by a _w_a_i_t_3 call. See this file for more information. There are two _o_p_t_i_o_n_s, which may be combined by _o_ring them together. The first is WNOHANG which causes the _w_a_i_t_3 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 _w_a_i_t_3. The second option is WUNTRACED which causes _w_a_i_t_3 to return information when children of the current process which are stopped but not traced (with _p_t_r_a_c_e(2)) because they received a SIGTTIN, SIGTTOU, SIGTSTP or SIGSTOP signal. See _s_i_g_s_y_s(2)) for a description of these signals. The _v_t_i_m_e_p pointer is an optional structure where a _v_t_i_m_e_s structure is returned describing the resources used by the terminated process and all its children. This may be given as "0" if the information is not desired. Currently this information is not available for stopped processes. SEE ALSO wait(2), exit(2), fork(2), sigsys(2) DIAGNOSTICS Returns -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. BUGS 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 versions of the system. Printed 11/10/80 1