Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!labrea!aurora!ames!sdcsvax!ucsdhub!hp-sdd!hplabs!hpcea!hpfcdc!rml From: rml@hpfcdc.HP.COM (Bob Lenk) Newsgroups: comp.sys.hp Subject: Re: UNIX WAIT3 function Message-ID: <5570011@hpfcdc.HP.COM> Date: Thu, 20-Aug-87 11:59:47 EDT Article-I.D.: hpfcdc.5570011 Posted: Thu Aug 20 11:59:47 1987 Date-Received: Sun, 23-Aug-87 14:38:14 EDT References: <1467@mit-amt.MEDIA.MIT.EDU> Organization: HP Ft. Collins, Co. Lines: 23 While wait3(2) is indeed documented on the wait(2) manual page, it is currently supported only on the series 800. Since the question was on the series 300 ("Bobcat") the answer is that wait3 is not available. Wait3 is a BSD-derived call; there are two ways in the System V world to get similar functionality (to a nonblocking wait): 1) Set a timeout with alarm(2) (or for a shorter timeout setitimer(2) - a BSD feature that is supported on the 300). 2) Only call wait(2) in response to a SIGCLD signal. Because of the semantics of SIGCLD (different from BSD SIGCHLD), you can be guaranteed exactly one signal per terminated child, and thus a wait(2) that will not block. Note that the SIGCLD signal handler must be coded to call wait(2) and to re-install the signal handler with signal(2) or sigvector(2) after the call to wait(2). The latter is probably a better way to structure code intended for System V, but may require more modification to code originally written for BSD. A timeout can be used to directly emulate non-blocking wait3. Bob Lenk {ihnp4, hplabs}!hpfcla!rml