Date: Fri, 13 Dec 2002 14:58:22 -0500 From: "David M. Gillham" <dmg@bsdwins.com> To: freebsd-java@freebsd.org Subject: Return code problems in 1.4.1 JDK vs 1.4.0 Message-ID: <20021213195822.GB90517@unx.sas.com>
index | next in thread | raw e-mail
When checking return codes for builds under the 1.4.0.01 JDK and 1.4.1
I'm seeing some odd differences. It looks like the non-zero rc value is
not getting passed back to the JDK. If I have processTest.java:
public class processTest {
public static void main(String[] args) {
try {
Process p = Runtime.getRuntime().exec(args[0]+" "+args[1]);
System.out.println("exit status: "+p.waitFor());
}
catch(Exception e){e.printStackTrace();}
}
}
and a program that fails to compile, bad.java:
public class bad {
public bad() {
System.out.println("foo);
}
}
I get different results for 1.4.0 vs 1.4.1:
/dmg>uname -a
FreeBSD bsdwins.com 4.6-STABLE FreeBSD 4.6-STABLE #0: Wed Nov 6
13:17:09 EST 2002 root@bsdwins.com:/usr/src/sys/compile/GENERIC
i386
/dmg>./jdk1.4.0.01/bin/java -version
java version "1.4.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)
/dmg>./jdk1.4.0.01/bin/java processTest ./jdk1.4.0.01/bin/javac bad.java
exit status: 1
/dmg>./jdk1.4.1/bin/java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
/dmg>./jdk1.4.1/bin/java processTest ./jdk1.4.0.01/bin/javac bad.java
exit status: 0
The 1.4.1 test should have picked up the failure in bad.java and
returned 1, not 0. Anyone have any ideas? Both of these JDK's are the
Linux versions from Sun. I'm wondering if there's some bug in the BSD
Linux emulation. I was able to reproduce this bug on STABLE and CURRENT.
On a fairly recent RedHat Linux install I got 1 and 1 for both JDK's.
Thanks,
-Dave
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021213195822.GB90517>
