Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ wait3(2J) — AUX SR8.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

wait(2)

exit(2)

fork(2)

sigsys(2)

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;

DESCRIPTION

The status and option 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 wait3 call.  See this file for more information. 

There are two options, which may be combined by oring 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 about children of the current process which are stopped 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 “0” if the information is not desired.  Currently this information is not available for stopped processes.  The vtimep pointer is not applicable to the AUX environment and will return garbage if used. 

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 is a Berkeley 4.1 call.  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. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026