.\" Copyright (c) 1983, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" This module is believed to contain source code proprietary to AT&T. .\" Use and redistribution is subject to the Berkeley Software License .\" Agreement and your Software Agreement with AT&T (Western Electric). .\" .\" @(#)wait.3 8.1 (Berkeley) 6/5/93 .\" .TH WAIT 3F "June 5, 1993" .UC 5 .SH NAME wait \- wait for a process to terminate .SH SYNOPSIS .B integer function wait (status) .br .B integer status .SH DESCRIPTION .I Wait causes its caller to be suspended until a signal is received or one of its child processes terminates. If any child has terminated since the last .I 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 .IR wait (2)). If the returned value is negative, it is the negation of a system error code. .SH FILES .ie \nM /usr/ucb/lib/libU77.a .el /usr/lib/libU77.a .SH "SEE ALSO" wait(2), signal(3F), kill(3F), perror(3F)