diff options
author | Kristján Valur Jónsson <sweskman@gmail.com> | 2013-03-19 22:07:35 (GMT) |
---|---|---|
committer | Kristján Valur Jónsson <sweskman@gmail.com> | 2013-03-19 22:07:35 (GMT) |
commit | 8927e8f4211dc50b87a6365ed7281452a1931ebf (patch) | |
tree | c519bb98128d6fa159ea2ea9b2e1a8c9f2b69067 /Lib/multiprocessing | |
parent | ac0866f2ab9aa43c635618681682dd9f6da6219e (diff) | |
download | cpython-8927e8f4211dc50b87a6365ed7281452a1931ebf.zip cpython-8927e8f4211dc50b87a6365ed7281452a1931ebf.tar.gz cpython-8927e8f4211dc50b87a6365ed7281452a1931ebf.tar.bz2 |
Issue #12098: multiprocessing on Windows now starts child processes
using the same sys.flags as the current process.
Backport from default branch.
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r-- | Lib/multiprocessing/forking.py | 3 | ||||
-rw-r--r-- | Lib/multiprocessing/util.py | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/multiprocessing/forking.py b/Lib/multiprocessing/forking.py index 1597ae8..dc465b4 100644 --- a/Lib/multiprocessing/forking.py +++ b/Lib/multiprocessing/forking.py @@ -361,7 +361,8 @@ else: return [sys.executable, '--multiprocessing-fork'] else: prog = 'from multiprocessing.forking import main; main()' - return [_python_exe, '-c', prog, '--multiprocessing-fork'] + opts = util._args_from_interpreter_flags() + return [_python_exe] + opts + ['-c', prog, '--multiprocessing-fork'] def main(): diff --git a/Lib/multiprocessing/util.py b/Lib/multiprocessing/util.py index fe76bcc..3ce480f 100644 --- a/Lib/multiprocessing/util.py +++ b/Lib/multiprocessing/util.py @@ -37,6 +37,7 @@ import weakref import atexit import threading # we want threading to install it's # cleanup function before multiprocessing does +from subprocess import _args_from_interpreter_flags from multiprocessing.process import current_process, active_children |