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

public class Test {
        public static void main(String argv[]) {
                try {
                        Runtime rt = Runtime.getRuntime();
                        Process p = rt.exec("./a.out");
                        System.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 [EMAIL PROTECTED] [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 [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to