wait() & negative values

carroll at m.cs.uiuc.edu carroll at m.cs.uiuc.edu
Tue Aug 21 10:27:00 AEST 1990


/* Written 10:13 am  Aug 20, 1990 by rvdp at cs.vu.nl in m.cs.uiuc.edu:comp.unix.i386 */
carroll at m.cs.uiuc.edu writes:
>sometimes returns negative values in *loc, e.g. 0xFFFFxxyy  where xx and yy
>are the values you'd normally expect in the bottom 16 bits of the return value.
wait(loc)
int *loc;

loc = 0xHHHH.LLLL
HHHH: low byte of child exit argument (0 on normal exit)
LLLL: termination status of child process (0 on normal exit)
/* End of text from m.cs.uiuc.edu:comp.unix.i386 */
I think that you are confused. You say "byte" but you use 4 hex digits, which
is _two_ bytes. TFM does not say "byte", it specifically says "8 bits", which
is 2 hex digits, so it would be 0xQQQQEETT with Q undefined, T termination
status, and E exit code.



More information about the Comp.unix.i386 mailing list