Annotation of researchv10no/cmd/spitbol/cint/oswait.c, revision 1.1.1.1

1.1       root        1: 
                      2: /*
                      3:        oswait( pid ) waits for the termination of the process with
                      4:        id pid.
                      5: */
                      6: 
                      7: #include "spitblks.h"
                      8: #include "spitio.h"
                      9: #include <signal.h>
                     10: 
                     11: oswait( pid )
                     12: 
                     13: int    pid;
                     14: 
                     15: {
                     16:        int     deadpid, status;
                     17:        register (*hstat)(), (*istat)(), (*qstat)();
                     18:        extern  struct  chfcb   *rzfcb;
                     19:        struct  chfcb   *chptr;
                     20: 
                     21:        istat   = signal( SIGINT,SIG_IGN );
                     22:        qstat   = signal( SIGQUIT,SIG_IGN );
                     23:        hstat   = signal( SIGHUP,SIG_IGN );
                     24: 
                     25:        while ( (deadpid = wait( &status )) != pid  &&
                     26:                (deadpid != -1) ) {
                     27:                for ( chptr = rzfcb; chptr != 0; chptr = chptr -> nxt ) {
                     28:                        if ( deadpid == chptr -> fcp -> iob -> pid ) {
                     29:                                chptr -> fcp -> iob -> flg |= IO_DED;
                     30:                                break;
                     31:                        }
                     32:                }
                     33:        }
                     34: 
                     35:        signal( SIGINT,istat );
                     36:        signal( SIGQUIT,qstat );
                     37:        signal( SIGHUP,hstat );
                     38: 
                     39:        return status;
                     40: }
                     41: 

unix.superglobalmegacorp.com

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