bpo-44935: enable posix_spawn() on Solaris (GH-27795)

Enable posix_spawn() on Solaris
This commit is contained in:
Jakub Kulík 2021-08-17 20:09:48 +02:00 committed by GitHub
parent 4b9a2dcf19
commit b1930bf75f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -660,8 +660,9 @@ def _use_posix_spawn():
# os.posix_spawn() is not available
return False
if sys.platform == 'darwin':
# posix_spawn() is a syscall on macOS and properly reports errors
if sys.platform in ('darwin', 'sunos5'):
# posix_spawn() is a syscall on both macOS and Solaris,
# and properly reports errors
return True
# Check libc name and runtime libc version

View File

@ -0,0 +1,2 @@
:mod:`subprocess` on Solaris now also uses :func:`os.posix_spawn()` for
better performance.