hkbirke@mit-amt.MEDIA.MIT.EDU (Hal Birkeland) (08/15/87)
Is there a function equivalent to the UNIX Wait3 function in HP-UX (Bobcat). The wait3 function is a non-blocking version of the wait function. Thanks for any assistance. -- hal hkbirke@media-lab.media.mit.edu
chuck@hpunsca.HP.COM (Chuck Munro) (08/18/87)
..... wait(3) ..... Hal, wait(3) is documented on the same manual page as wait(2) in my latest HP-UX Reference (version B.1). Hope this is the info you require. Chuck Munro ....!hpfcse!hpunsca!chuck
rml@hpfcdc.HP.COM (Bob Lenk) (08/20/87)
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