Re: [classlib][IBMVME]the return value of java.exe

2006-10-31 Thread Evgueni Brevnov
My experiments show that System.exit() terminate the whole process on RI not only running VM. Do we all agree this is how it should work? Does this affect embedded VMs in a negative way? Evgueni. On 10/30/06, Alexey Varlamov [EMAIL PROTECTED] wrote: 2006/10/30, Evgueni Brevnov [EMAIL

Re: [classlib][IBMVME]the return value of java.exe

2006-10-31 Thread Gregory Shimansky
On Tuesday 31 October 2006 16:39 Evgueni Brevnov wrote: My experiments show that System.exit() terminate the whole process on RI not only running VM. Do we all agree this is how it should work? Does this affect embedded VMs in a negative way? I think that any process that runs JVM in itself

Re: [classlib][IBMVME]the return value of java.exe

2006-10-30 Thread Tim Ellison
Evgueni Brevnov wrote: BTW, here is two more interesting cases 1) Throw uncaught exception in a new thread. Both RI and DRLVM give 0 in that case. 2) Call System.exit(123) in a new thread. Both RI and DRLVM give 123. Currently, DRLVM calls system _exit() at the end of System.exit().

Re: [classlib][IBMVME]the return value of java.exe

2006-10-30 Thread Evgueni Brevnov
Tim, I agree, we shouldn't kill entire process. Unfortunately, it is how current implementation does. Actually, shutdown process is a weak place of DRLVM and needs deep refactoring. I will try to figure out what we can do as a short term solution. Evgueni On 10/30/06, Tim Ellison [EMAIL

Re: [classlib][IBMVME]the return value of java.exe

2006-10-30 Thread Evgueni Brevnov
Hi, https://issues.apache.org/jira/browse/HARMONY-2006 is created with patches :-). I created two separate patches one for DRLVM another one for Classlib. I don't know if IBMVME requires additional changes. Even though DestroyJavaVM will not terminate the whole process now it still doesn't clean

Re: [classlib][IBMVME]the return value of java.exe

2006-10-30 Thread Alexey Varlamov
2006/10/30, Evgueni Brevnov [EMAIL PROTECTED]: Hi, https://issues.apache.org/jira/browse/HARMONY-2006 is created with patches :-). I created two separate patches one for DRLVM another one for Classlib. I don't know if IBMVME requires additional changes. Even though DestroyJavaVM will not

[classlib][IBMVME]the return value of java.exe

2006-10-29 Thread Tony Wu
Consider this class, public class TestExeReturn { public static void main(String[] args) throws Exception { throw new Exception(); } } when we run java TestExeReturn and echo %errorlevel%, we got 1 of RI, -1 of DRLVM and 0 for IBMVM. a testcase of apache ant failed for this issue.

Re: [classlib][IBMVME]the return value of java.exe

2006-10-29 Thread Spark Shen
Then we may need to follow RI, since different error code fails application Best regards Tony Wu 写道: Consider this class, public class TestExeReturn { public static void main(String[] args) throws Exception { throw new Exception(); } } when we run java TestExeReturn and echo %errorlevel%, we

Re: [classlib][IBMVME]the return value of java.exe

2006-10-29 Thread Evgueni Brevnov
hmmm I got 0 for DRLVM on Win2003 Evgueni On 10/30/06, Spark Shen [EMAIL PROTECTED] wrote: Then we may need to follow RI, since different error code fails application Best regards Tony Wu 写道: Consider this class, public class TestExeReturn { public static void main(String[] args)

Re: [classlib][IBMVME]the return value of java.exe

2006-10-29 Thread Tony Wu
Anyway it should not be 0 when throws exception I think. I tried on drlvm on xp sp2, it returns -1. my drlvm version is 453419. On 10/30/06, Evgueni Brevnov [EMAIL PROTECTED] wrote: hmmm I got 0 for DRLVM on Win2003 Evgueni On 10/30/06, Spark Shen [EMAIL PROTECTED] wrote: Then we may

Re: [classlib][IBMVME]the return value of java.exe

2006-10-29 Thread Evgueni Brevnov
I'll try to see how to fix it for DRLVM Evgueni On 10/30/06, Evgueni Brevnov [EMAIL PROTECTED] wrote: hmmm I got 0 for DRLVM on Win2003 Evgueni On 10/30/06, Spark Shen [EMAIL PROTECTED] wrote: Then we may need to follow RI, since different error code fails application Best regards

Re: [classlib][IBMVME]the return value of java.exe

2006-10-29 Thread Evgueni Brevnov
It seems we need to fix the launcher... which is common part for both DRLVM and IBVME. I see the problem in the following code sequence... snip (*jvm)-DetachCurrentThread(jvm); (*jvm)-DestroyJavaVM (jvm); /snip The current thread has an uncaught exception raised before it calls

Re: [classlib][IBMVME]the return value of java.exe

2006-10-29 Thread Evgueni Brevnov
BTW, here is two more interesting cases 1) Throw uncaught exception in a new thread. Both RI and DRLVM give 0 in that case. 2) Call System.exit(123) in a new thread. Both RI and DRLVM give 123. Currently, DRLVM calls system _exit() at the end of System.exit(). That's why DestroyJavaVM never