Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!hplabs!hpda!hpcupt1!decot From: decot@hpcupt1.cup.hp.com (Dave Decot) Newsgroups: comp.sys.hp Subject: Re: About wait(2)... Message-ID: <67870016@hpcupt1.cup.hp.com> Date: 29 Apr 91 23:29:16 GMT References: <281737c1.49d2@petunia.CalPoly.EDU> Organization: Hewlett Packard, Cupertino Lines: 36 See the "Notes" section on the HP-UX wait(2) man page (I hope it was in 6.5, but it is certainly there in 7.0 and 8.0). You may want to consider updating to HP-UX 7.0 and/or HP-UX 8.0. > 2. Is there a difference in the way wait() works on HP/UX? Yes, these are differences between POSIX and BSD. In particular, the value returned in the variable to which wait's argument points can no longer be decoded using the WIF* functions used in BSD. Unfortunately, POSIX chose to use those macro names for a different interface for decoding the value, and HP-UX followed POSIX. However, the BSD macros are still available by defining the _BSD symbol (using the -D_BSD option on the cc command line). I don't know if this worked in 6.5; it's been quite a while since that release was current. > 1. Did I do something wrong in the changes I made? Yes. Either change the code back to the BSD way and compile the code with the -D_BSD option (this is best if you want the code to still port to BSD 4.3 or earlier), or convert the code to use the POSIX version of these macros as described on HP-UX's wait(2) man page (this will work with BSD 4.4 or later). > 3. What happens if the third parameter to wait3 isn't a null pointer? "The third parameter to wait3 is currently unused and must always be a null pointer." If it isn't, no warranty is expressed or implied, since you have violated the requirements of the documentation. Among the possible results are a memory fault, or mysterious changes to unrelated variables. Dave