[Python-Dev] Re: Hang with parallel make

2020年2月26日 09:57:29 -0800

A change to posix_spawnp() fixes the problem for me:
 diff --git a/Lib/distutils/spawn.py b/Lib/distutils/spawn.py
 index ceb94945dc..cb69de4242 100644
 --- a/Lib/distutils/spawn.py
 +++ b/Lib/distutils/spawn.py
 @@ -90,7 +90,7 @@ def _spawn_posix(cmd, search_path=1, verbose=0, 
dry_run=0):
 return
 executable = cmd[0]
 exec_fn = search_path and os.execvp or os.execv
 - env = None
 + env = os.environ
 if sys.platform == 'darwin':
 global _cfg_target, _cfg_target_split
 if _cfg_target is None:
 @@ -112,7 +112,7 @@ def _spawn_posix(cmd, search_path=1, verbose=0, 
dry_run=0):
 env = dict(os.environ,
 MACOSX_DEPLOYMENT_TARGET=cur_target)
 exec_fn = search_path and os.execvpe or os.execve
 - pid = os.fork()
 + pid = os.posix_spawnp(executable, cmd, env)
 if pid == 0: # in the child
 try:
 if env is None:
--Elad
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/3SJ53WLPMMHT7AJUBGBS3ANEMAEAVWAW/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to