Issue783042

classification
Title: sys.exit arg ignored for frozen app
Type: Severity: normal
Components: Jythonc compiler Versions:
Milestone:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: fwierzbicki, stepturn
Priority: low Keywords:

Created on 2003-08-04.19:53:54 by stepturn, last changed 2009-03-13.23:26:17 by fwierzbicki.

Files
File name Uploaded Description Edit Remove
test_exit.py stepturn, 2003-08-04.19:59:19
Messages
msg862 (view) Author: Stephen Turner (stepturn) Date: 2003-08-04.19:53:54
Given the following code:

# test_exit.py
import sys
def exitfunc():
    print 'exiting'
sys.exitfunc = exitfunc
try:
    sys.exit('goodbye')
finally:
    print 'finally'

If executed by the jython interpreter, the script 
produces the following output:

$ jython test_exit.py
finally
exiting
goodbye

The host OS correctly reports an exit status of 1 for the 
JVM.

However, if frozen by jythonc, the script produces the 
following output when run:

$ jythonc --core --jar test_exit.jar test_exit.py
$ java -jar test_exit.jar
finally
exiting

In this case, the host OS incorrectly reports an exit 
status of 0 for the JVM.  Also, the string object passed 
to sys.exit is never printed by the Jython runtime.

The results are similar if the sys.exit argument is a non-
zero integer instead of a string.  The argument is 
ignored by the Jython runtime for a frozen application, 
and the JVM exits with a status code of 0.

Regards,
Stephen
msg4263 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2009-03-13.23:26:17
jythonc is no longer maintained.
History
Date User Action Args
2009-03-13 23:26:17fwierzbickisetstatus: open -> closed
resolution: wont fix
messages: + msg4263
nosy: + fwierzbicki
2003-08-04 19:53:54stepturncreate