[Python-checkins] cpython (3.3): Fix handling of SystemExit and exit code. Patch by Brodie Rao.
richard.oudkerk
python-checkins at python.org
Sun Nov 17 18:37:27 CET 2013
http://hg.python.org/cpython/rev/44b5ec2f0f5d
changeset: 87209:44b5ec2f0f5d
branch: 3.3
parent: 87206:11cafbe6519f
user: Richard Oudkerk <shibturn at gmail.com>
date: Sun Nov 17 17:24:11 2013 +0000
summary:
Fix handling of SystemExit and exit code. Patch by Brodie Rao.
files:
Lib/multiprocessing/process.py | 2 +-
Lib/test/test_multiprocessing.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/multiprocessing/process.py b/Lib/multiprocessing/process.py
--- a/Lib/multiprocessing/process.py
+++ b/Lib/multiprocessing/process.py
@@ -266,7 +266,7 @@
exitcode = e.args[0]
else:
sys.stderr.write(str(e.args[0]) + '\n')
- exitcode = 0 if isinstance(e.args[0], str) else 1
+ exitcode = 1
except:
exitcode = 1
import traceback
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -467,7 +467,7 @@
testfn = test.support.TESTFN
self.addCleanup(test.support.unlink, testfn)
- for reason, code in (([1, 2, 3], 1), ('ignore this', 0)):
+ for reason, code in (([1, 2, 3], 1), ('ignore this', 1)):
p = self.Process(target=self._test_sys_exit, args=(reason, testfn))
p.daemon = True
p.start()
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list