Plan 9 - man page for wait (plan9 section 2)
|Linux & Unix Commands - Search Man Pages
wait - wait for a process to exit
int wait(Waitmsg *w)
Wait causes a process to wait for any child process (see fork(2)) to exit. It returns the
pid of a child that has exited and fills in w with more information about the child. W
points to a Waitmsg, which has this structure:
char pid; /* of loved one */
char time[3*12]; /* of loved one & descendants */
Pid is the child's process id. The time array contains the time the child and its descen-
dants spent in user code, the time spent in system calls, and the child's elapsed real
time, all in units of milliseconds. All integers in a Waitmsg are formatted as right-jus-
tified textual numbers in 11-byte fields followed by a blank. Msg contains the message
that the child specified in exits(2). For a normal exit, msg is zero, otherwise msg is
prefixed by the process name, a blank, the process id, and a colon.
If there are no more children to wait for, wait returns immediately, with return value -1.
fork(2), exits(2), the wait file in proc(3)
All times are GMT -4. The time now is 03:44 PM.