moved ioinit.f from libI77 to here (from dlw).
[unix-history] / usr / src / usr.bin / f77 / libU77 / wait_.c
CommitLineData
5a20a8e6
DW
1/*
2char id_wait[] = "@(#)wait_.c 1.1";
3 *
4 * wait for a child to die
5 *
6 * calling sequence:
7 * integer wait, status, chilid
8 * chilid = wait(status)
9 * where:
10 * chilid will be - >0 if child process id
11 * - <0 if (negative of) system error code
12 * status will contain the exit status of the child
13 * (see wait(2))
14 */
15
16extern int errno;
17
18long wait_(status)
19long *status;
20{
21 int stat;
22 int chid = wait(&stat);
23 if (chid < 0)
24 return((long)(-errno));
25 *status = (long)stat;
26 return((long)chid);
27}