Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.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: wait() & negative values Message-ID: <70400015@m.cs.uiuc.edu> Date: 19 Aug 90 21:13:00 GMT Lines: 18 Nf-ID: #N:m.cs.uiuc.edu:70400015:000:1039 Nf-From: m.cs.uiuc.edu!carroll Aug 19 16:13:00 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@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