|
From: <pj...@us...> - 2010-12-24 23:17:13
|
Revision: 7177
http://jython.svn.sourceforge.net/jython/?rev=7177&view=rev
Author: pjenvey
Date: 2010-12-24 23:17:07 +0000 (Fri, 24 Dec 2010)
Log Message:
-----------
don't force System.exit on a successful main thread exit, so we don't stop
non-daemon threads
Modified Paths:
--------------
trunk/jython/src/org/python/util/jython.java
Modified: trunk/jython/src/org/python/util/jython.java
===================================================================
--- trunk/jython/src/org/python/util/jython.java 2010-12-24 02:36:59 UTC (rev 7176)
+++ trunk/jython/src/org/python/util/jython.java 2010-12-24 23:17:07 UTC (rev 7177)
@@ -160,7 +160,6 @@
if (!opts.fixInteractive || opts.interactive) {
opts.interactive = ((PyFile)Py.defaultSystemState.stdin).isatty();
if (!opts.interactive) {
-
systemState.ps1 = systemState.ps2 = Py.EmptyString;
}
}
@@ -243,7 +242,7 @@
if (PosixModule.getPOSIX().isatty(file.getFD())) {
opts.interactive = true;
interp.interact(null, new PyFile(file));
- System.exit(0);
+ return;
} else {
interp.execfile(file, opts.filename);
}
@@ -294,7 +293,7 @@
interp.set("name", Py.newString(opts.moduleName));
interp.exec("runpy.run_module(name, run_name='__main__', alter_sys=True)");
interp.cleanup();
- System.exit(0);
+ return;
} catch (Throwable t) {
Py.printException(t);
interp.cleanup();
@@ -323,9 +322,6 @@
}
}
interp.cleanup();
- if (opts.fixInteractive || opts.interactive) {
- System.exit(0);
- }
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|