1: #ifndef lint
   2: static char sccsid[] = "@(#)wwchild.c	3.5 4/24/85";
   3: #endif
   4: 
   5: /*
   6:  * Copyright (c) 1983 Regents of the University of California,
   7:  * All rights reserved.  Redistribution permitted subject to
   8:  * the terms of the Berkeley Software License Agreement.
   9:  */
  10: 
  11: #include "ww.h"
  12: #include <sys/wait.h>
  13: 
  14: wwchild()
  15: {
  16:     extern errno;
  17:     int olderrno;
  18:     register struct ww **wp;
  19:     union wait w;
  20:     int pid;
  21: 
  22:     olderrno = errno;
  23:     while ((pid = wait3(&w, WNOHANG|WUNTRACED, (struct rusage *)0)) > 0) {
  24:         for (wp = wwindex; wp < &wwindex[NWW]; wp++) {
  25:             if (*wp && (*wp)->ww_state == WWS_HASPROC
  26:                 && (*wp)->ww_pid == pid) {
  27:                 (*wp)->ww_state = WWS_DEAD;
  28:                 break;
  29:             }
  30:         }
  31:     }
  32:     errno = olderrno;
  33: }

Defined functions

wwchild defined in line 14; used 1 times

Defined variables

sccsid defined in line 2; never used
Last modified: 1987-02-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2125
Valid CSS Valid XHTML 1.0 Strict