Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!carroll From: carroll@m.cs.uiuc.edu Newsgroups: comp.unix.i386 Subject: Re: wait() & negative values Message-ID: <70400017@m.cs.uiuc.edu> Date: 21 Aug 90 00:27:00 GMT References: <70400015@m.cs.uiuc.edu> Lines: 16 Nf-ID: #R:m.cs.uiuc.edu:70400015:m.cs.uiuc.edu:70400017:000:739 Nf-From: m.cs.uiuc.edu!carroll Aug 20 19:27:00 1990 /* Written 10:13 am Aug 20, 1990 by rvdp@cs.vu.nl in m.cs.uiuc.edu:comp.unix.i386 */ carroll@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.