Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!sdcsvax!ucsdhub!hp-sdd!hplabs!decwrl!sgi!vjs From: vjs@rhyolite.SGI.COM (Vernon Schryver) Newsgroups: comp.sys.sgi Subject: Re: wait3 Summary: wait3() hacks in SYS V Message-ID: <8826@sgi.SGI.COM> Date: 10 Dec 87 16:41:02 GMT References: <8712081347.AA20022@zorac.ARPA> Sender: daemon@sgi.SGI.COM Organization: Silicon Graphics Inc, Mountain View, CA Lines: 15 In article <8712081347.AA20022@zorac.ARPA>, tim@ZORAC.ARPA (Tim Pointing) writes: > Often, the only reason why wait3() is used instead of wait() is so that > a wait can be done without delaying if there is no child process have status > to report (where wait() would just sit around until one did have status to > report.) Mr. Pointing seems to be on the right track. The SGI TCP/IP/UDP code is 4.3 BSD based. As you might guess, when we did the ports for 3.5 and 1.0 we encountered uses of wait3(2). Whenever we port more 4.x compatible code, we find more uses of wait3. However, instead of using alarm(2) and SIGALRM, we use SIGCHLD. Your process can get SIGCHLD when one of its children exits. (Note: beware the surprising effect of setting SIGCHLD to SIG_IGN in SYS V.)