xref: /original-bsd/share/man/man3f/wait.3 (revision 4405f301)
Copyright (c) 1983, 1993
The Regents of the University of California. All rights reserved.

%sccs.include.proprietary.roff%

@(#)wait.3 8.1 (Berkeley) 06/05/93

WAIT 3F ""
C 5
NAME
wait - wait for a process to terminate
SYNOPSIS
integer function wait (status)

integer status

DESCRIPTION
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 wait, return is immediate; if there are no children, return is immediate with an error code.

If the returned value is positive, it is the process ID of the child and status is its termination status (see wait (2)). If the returned value is negative, it is the negation of a system error code.

FILES
"SEE ALSO"
wait(2), signal(3F), kill(3F), perror(3F)