Skip to content

Commit

Permalink
bpo-26434: Fix multiprocessing grandchilds in a Windows service (GH-1167
Browse files Browse the repository at this point in the history
)

Patch by Davin with help from Marc.
  • Loading branch information
schlamar authored and applio committed May 19, 2017
1 parent dfcfc91 commit c47c315
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/multiprocessing/forking.py
Expand Up @@ -405,7 +405,8 @@ def get_preparation_data(name):
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]
Expand Down

0 comments on commit c47c315

Please sign in to comment.