All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.
@(#)wait3.2j 4.1 (Berkeley) 05/09/85
"#include <wait.h>" "#include <sys/vtimes.h>"wait3(status, options, vtimep) union wait status; int options; struct vtimes *vtimep;
cc ... -ljobs
There are two options, which may be combined by or ing them together. The first is WNOHANG which causes the wait3 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 wait3. The second option is WUNTRACED which causes wait3 to return information when children of the current process which are stopped but not traced (with ptrace (2)) because they received a SIGTTIN, SIGTTOU, SIGTSTP or SIGSTOP signal. See sigsys (2)) for a description of these signals.
The vtimep pointer is an optional structure where a vtimes 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 for stopped processes.