diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/multiprocessing/context.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/multiprocessing/context.py b/Lib/multiprocessing/context.py index 5a4865751c..5f8e0f0cd4 100644 --- a/Lib/multiprocessing/context.py +++ b/Lib/multiprocessing/context.py @@ -309,7 +309,12 @@ if sys.platform != 'win32': 'spawn': SpawnContext(), 'forkserver': ForkServerContext(), } - _default_context = DefaultContext(_concrete_contexts['fork']) + if sys.platform == 'darwin': + # bpo-33725: running arbitrary code after fork() is no longer reliable + # on macOS since macOS 10.14 (Mojave). Use spawn by default instead. + _default_context = DefaultContext(_concrete_contexts['spawn']) + else: + _default_context = DefaultContext(_concrete_contexts['fork']) else: |