Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Lib/multiprocessing/forking.py
Original file line number Diff line number Diff line change
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