Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Sep 2001 10:23:16 +0200
From:      "Georg-W. Koltermann" <gwk@sgi.com>
To:        java@freebsd.org
Subject:   exit value of external process always reported as 0
Message-ID:  <lthite9vvyj.wl@hunter.munich.sgi.com>

next in thread | raw e-mail | index | archive | help
Hi,

with the current FreeBSD JDK 1.3.1 compiled from ports I always get
zero exit values for external processes.  Even if I run "false", I get
an exit value of 0:

    hunter[14]$ cat Gwk.java
    public class Gwk {
	public static void main(String argv[]) throws Exception {
	    Process p = Runtime.getRuntime().exec("false");
	    System.out.println("waitFor(): " + p.waitFor());
	    System.out.println("exitValue(): " + p.exitValue());
	}
    }
    hunter[15]$ javac Gwk.java
    hunter[16]$ java -showversion Gwk
    java version "1.3.1-internal"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-internal-gwk-010911-22:36)
    Classic VM (build 1.3.1-internal-gwk-010911-22:36, green threads, nojit)

    waitFor(): 0
    exitValue(): 0
    hunter[17]$ 

The Linux jdk returns the expected result:

    hunter[3]$ java -showversion Gwk
    java version "1.3.1_01"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
    Classic VM (build 1.3.1_01, green threads, nojit)

    waitFor(): 1
    exitValue(): 1

--
Regards,
Georg.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?lthite9vvyj.wl>