From owner-freebsd-java Fri Dec 13 12:18:36 2002 Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53CA037B401 for ; Fri, 13 Dec 2002 12:18:34 -0800 (PST) Received: from bsdone.bsdwins.com (www.bsdwins.com [192.58.184.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B17B43EC2 for ; Fri, 13 Dec 2002 12:18:33 -0800 (PST) (envelope-from dmg@bsdwins.com) Received: from bsdone.bsdwins.com (localhost [127.0.0.1]) by bsdone.bsdwins.com (8.12.5/8.12.5) with ESMTP id gBDJwMW2090812 for ; Fri, 13 Dec 2002 14:58:27 -0500 (EST) (envelope-from dmg@www.bsdwins.com) Received: (from dmg@localhost) by bsdone.bsdwins.com (8.12.5/8.12.5/Submit) id gBDJwMSA090811 for freebsd-java@freebsd.org; Fri, 13 Dec 2002 14:58:22 -0500 (EST) Date: Fri, 13 Dec 2002 14:58:22 -0500 From: "David M. Gillham" 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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