wait() & negative values

carroll at m.cs.uiuc.edu carroll at m.cs.uiuc.edu
Mon Aug 20 07:13:00 AEST 1990


As has been noted by others, Epoch is a little unstable when running
subprocesses under ISC 2.0.2. While part of this was errors on my part, I've
recently tracked at least some of the crashes down to the fact that wait(loc)
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.
TFM specifies the contents of the bottom 16 bits of *loc, but says absolutely
nothing about the top 16 bits. The GNU-Emacs process internals assume that
the value is positive, in particular that the type and mark bits are 0
(generally the top 8 bits). A simple fix is to use 
	w &= 0xFFFF;
immediately after the wait. Is this reasonable? Does Emacs make unwarranted
assumptions about wait(), or is this an ISC bug?

Alan M. Carroll                Barbara/Marilyn in '92 :
carroll at cs.uiuc.edu            + This time, why not choose the better halves?
Epoch Development Team         
CS Grad / U of Ill @ Urbana    ...{ucbvax,pur-ee,convex}!cs.uiuc.edu!carroll



More information about the Comp.unix.i386 mailing list