java.lang.Process.exitValue() wrong

Weiqi Gao weiqigao@networkusa.net
Sun Sep 23 16:26:00 GMT 2001


On Sun, 2001-09-23 at 09:30, David Vrabel wrote:
> On 23 Sep 2001, Weiqi Gao wrote:
> 
> > In GCC 3.0, on both Solaris/sparc and Linux/intel, I have encountered
> > the following problems: [odd return value after a Process.waitFor()].
> 
> I believe the system call wait() (which presumably Process.waitFor()  is
> using returns an encoded value containing the process return value and how
> the process was terminated.  Read the man page for wait()  for details.

Then the implementation of java.lang.Process should probably use the
appropriate macros to extract the true status and return that from
waitFor() and exitValue().

-- 
Weiqi Gao
weiqigao@networkusa.net



More information about the Java mailing list