thanks for "down" answers
david wald
wald-david at CS.YALE.EDU
Fri Dec 16 03:19:04 AEST 1988
In article <1082 at goofy.megatest.UUCP> djones at megatest.UUCP (Dave Jones) writes:
>From article <1886 at loral.UUCP>, by jlh at loral.UUCP (Physically Phffft):
>> In all his examples he used wait ( (char *) 0).
>
>From the manual:
>
> #include <sys/wait.h>
>
> 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 at yale.UUCP
waldave at yalevm.bitnet
============================================================================
More information about the Comp.lang.c
mailing list