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

next in thread | raw e-mail | index | archive | help
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 ?

--=20
----------------------------------------
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?200303031939.52174.michael>