8000 bpo-44935: enable posix_spawn() on Solaris (GH-27795) · python/cpython@b1930bf · GitHub
[go: up one dir, main page]

Skip to content

Commit b1930bf

Browse files
authored
bpo-44935: enable posix_spawn() on Solaris (GH-27795)
Enable posix_spawn() on Solaris
1 parent 4b9a2dc commit b1930bf

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Lib/subprocess.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,8 +660,9 @@ def _use_posix_spawn():
660660
# os.posix_spawn() is not available
661661
return False
662662

663-
if sys.platform == 'darwin':
664-
# posix_spawn() is a syscall on macOS and properly reports errors
663+
if sys.platform in ('darwin', 'sunos5'):
664+
# posix_spawn() is a syscall on both macOS and Solaris,
665+
# and properly reports errors
665666
return True
666667

667668
# Check libc name and runtime libc version
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
:mod:`subprocess` on Solaris now also uses :func:`os.posix_spawn()` for
2+
better performance.

0 commit comments

Comments
 (0)
0