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