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

Skip to content

Commit 826e059

Browse files
[3.10] bpo-44935: enable posix_spawn() on Solaris (GH-27795) (GH-27800)
Enable posix_spawn() on Solaris (cherry picked from commit b1930bf) Co-authored-by: Jakub Kulík <Kulikjak@gmail.com> Automerge-Triggered-By: GH:gpshead
1 parent 3f81e96 commit 826e059

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