Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Mar 2003 19:48:48 +0200
From:      Michael Spector <michael@zend.com>
To:        freebsd-questions@freebsd.org
Subject:   Fwd: FreeBSD Java bug?
Message-ID:  <200303031948.48728.michael@zend.com>

next in thread | raw e-mail | index | archive | help
I forgot something :)

System:=094.7-RELEASE-p3 FreeBSD
Java:=09=09java version "1.4.1_01"
=09=09Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b0=
1)
=09=09Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)

----------  Forwarded Message  ----------

Subject: FreeBSD Java bug?
Date: Mon, 3 Mar 2003 19:39:52 +0200
From: Michael Spector <michael@zend.com>
To: freebsd-questions@freebsd.org

Java code:
~~~~~~~~~~
import java.lang.*;

public class Test {
        public static void main(String argv[]) {
                try {
                =09Runtime rt =3D Runtime.getRuntime();
                =09Process p =3D rt.exec("./a.out");
                =09System.out.println("Exit code: " + p.waitFor());
                }
                catch(Exception e) { e.printStackTrace(); }
        }
}

C code:
~~~~~~~
#include <stdio.h>

int main()
{
        exit(7);
}

I'm executing:
~~~~~~~~~~~

19:31 michael@gibraltar [michael]--> java Test
Exit code: 0

Why exit code is not 7 ?

--
----------------------------------------
With best regards, Michael Spector
Tel: 972-(0)54840565

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




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