1: /*
   2: char 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: 
  16: #include    "../libI77/fiodefs.h"
  17: 
  18: extern int errno;
  19: 
  20: ftnint wait_(status)
  21: ftnint *status;
  22: {
  23:     int stat;
  24:     int chid = wait(&stat);
  25:     if (chid < 0)
  26:         return((ftnint)(-errno));
  27:     *status = (ftnint)stat;
  28:     return((ftnint)chid);
  29: }

Defined functions

wait_ defined in line 20; never used
Last modified: 1983-07-08
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 508
Valid CSS Valid XHTML 1.0 Strict