diff --git a/Lib/multiprocessing/process.py b/Lib/multiprocessing/process.py index cd52736a70f..68959bf9f43 100644 --- a/Lib/multiprocessing/process.py +++ b/Lib/multiprocessing/process.py @@ -262,7 +262,7 @@ def _bootstrap(self): 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 index ad77260c057..183e86fd3ab 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -474,7 +474,7 @@ def test_sys_exit(self): 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()