[issue26434] multiprocessing cannot spawn grandchild from a Windows service
Davin Potts
report at bugs.python.org
Fri Feb 26 11:33:18 EST 2016
Davin Potts added the comment:
I can reproduce the problem under Windows 7. Thank you for your example and description -- they were very helpful.
Detection that the original parent was PythonService.exe is necessary to avoid undoing the paths set appropriately for running under a service. The current code only detects the immediate parent.
Modifying get_preparation_data() in lib/multiprocessing/forking.py to perform an additional test on the inherited values from the original parent's sys.argv (available via the preparation_data key 'sys_argv') would resolve this:
if not d['sys_argv'][0].lower().endswith("pythonservice.exe"):
....
Potential complications to existing code appear very unlikely given its nature.
Patch forthcoming after running tests unless someone wants to beat me to it.
----------
assignee: -> davin
nosy: +davin
stage: -> needs patch
type: crash -> behavior
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26434>
_______________________________________
More information about the Python-bugs-list
mailing list