.\" @(#)wait.3f 1.3 86/01/02 SMI; from UCB 4.2 .TH WAIT 3F "07 July 1995" .SH NAME wait \- wait for a process to terminate .SH SYNOPSIS .\" .IX wait "" \fLwait\fP .IX process "wait for terminatation" .IX "terminate - wait for process to terminate" .\" .B integer*4 function wait (status) .br .B integer*4 status .SH DESCRIPTION .B wait causes its caller to be suspended until a signal is received, or until one of its child processes terminates. If any child has terminated since the last .BR wait , return is immediate; if there are no children, return is immediate with an error code. .PP If the returned value is positive, it is the process ID of the child, and .I status is its termination status (see .BR wait (2)). If the returned value is negative, it is the negation of a system error code. .\" .SH FILES .\" .B libF77.a .SH "SEE ALSO" .BR wait (2), .BR signal (3F), .BR kill (3F), .BR perror (3F)