Path: utzoo!attcan!uunet!yale!wald-david From: wald-david@CS.YALE.EDU (david wald) Newsgroups: comp.lang.c Subject: Re: thanks for "down" answers Message-ID: <45753@yale-celray.yale.UUCP> Date: 15 Dec 88 17:19:04 GMT References: <1886@loral.UUCP> <1082@goofy.megatest.UUCP> Sender: root@yale.UUCP Reply-To: wald-david@CS.YALE.EDU (david wald) Organization: Yale University Computer Science Dept, New Haven CT 06520-2158 Lines: 26 In article <1082@goofy.megatest.UUCP> djones@megatest.UUCP (Dave Jones) writes: >From article <1886@loral.UUCP>, by jlh@loral.UUCP (Physically Phffft): >> In all his examples he used wait ( (char *) 0). > >From the manual: > > #include > > pid = wait(status) > int pid; > union wait *status; > > pid = wait(0) > int pid; > >Your instructor correctly casts the 0 to a pointer-type, which >the manual omits. On the other hand, it's the wrong type, and there's no guarantee that a (char *) will work any better than an int, rather than a (union wait *). ============================================================================ David Wald wald-david@yale.UUCP waldave@yalevm.bitnet ============================================================================