Skip to content

Commit 92d82d1

Browse files
committed
gh-80334: Have multiprocessing.freeze_support() enable on spawn, not just win32.
1 parent 973b8f6 commit 92d82d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/multiprocessing/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def freeze_support(self):
145145
'''Check whether this is a fake forked process in a frozen executable.
146146
If so then run code specified by commandline and exit.
147147
'''
148-
if sys.platform == 'win32' and getattr(sys, 'frozen', False):
148+
if self.get_start_method() == 'spawn' and getattr(sys, 'frozen', False):
149149
from .spawn import freeze_support
150150
freeze_support()
151151

0 commit comments

Comments
 (0)