Commit c47c3158 authored by Marc Schlaich's avatar Marc Schlaich Committed by Davin Potts

bpo-26434: Fix multiprocessing grandchilds in a Windows service (GH-1167)

Patch by Davin with help from Marc.
parent dfcfc915
......@@ -405,7 +405,8 @@ else:
if _logger is not None:
d['log_level'] = _logger.getEffectiveLevel()
if not WINEXE and not WINSERVICE:
if not WINEXE and not WINSERVICE and \
not d['sys_argv'][0].lower().endswith('pythonservice.exe'):
main_path = getattr(sys.modules['__main__'], '__file__', None)
if not main_path and sys.argv[0] not in ('', '-c'):
main_path = sys.argv[0]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment