Annotation of 43BSD/ucb/window/wwchild.c, revision 1.1.1.1

1.1       root        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: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.