Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!gatech!purdue!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Catching termination of child process and system() call Message-ID: <15018@smoke.brl.mil> Date: 30 Jan 91 19:40:13 GMT References: <1991Jan25.022950.10683@tkou02.enet.dec.com> <14977@smoke.brl.mil> <1356@geovision.UUCP> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 29 In article <1356@geovision.UUCP> pt@geovision.gvc.com writes: >gwyn@smoke.brl.mil (Doug Gwyn) writes: >>No, it's wait((int*)0) in all flavors of UNIX and POSIX. >So Doug: is Ultrix not a flavour of unix? Well, that's a question I prefer not to answer. However, I explained the "union wait" situation previously. Here it is again: Some "helpful" soul at UCB decided that it would be "nicer" to declare a union type for the wait() status, with bit field members designating the "subfields" of the status, than to simply announce, as had been the case universally in UNIX to that point, which bits of the int-type status had which meanings. Unfortunately, because of the lack of standard bit-field allocation semantics, to accommodate all previously existing C code that had been written according to the rules to that point, porting 4.nBSD to a new platform always required that the BSD porter check the bit-field definition and if necessary adjust it to accurately reflect the REAL definition of the wait() status, which has always been in terms of the lowest 16 bits of an int representation. I just examined the 4.3BSD kernel source code and found no use of the w_* identifiers that are declared/defined in . I did, however, find places where the kernel treated the wait() status as type int. This even more strongly indicates that the true type is int and that is simply a bogus invention. Note that int* and union wait* need not have the same representation (although they do in many implementations including VAX 4.3BSD PCC), so it does matter what the argument type really is. It is int*.