summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2019-01-26 23:19:11 (GMT)
committerGitHub <noreply@github.com>2019-01-26 23:19:11 (GMT)
commit81d04bcf2124341aa73e5c13c1f1c4bdd3f5dbef (patch)
tree62776528493f6322f9bd19e44395ea6388001727 /Lib/subprocess.py
parentd8080c01195cc9a19af752bfa04d98824dd9fb15 (diff)
downloadcpython-81d04bcf2124341aa73e5c13c1f1c4bdd3f5dbef.zip
cpython-81d04bcf2124341aa73e5c13c1f1c4bdd3f5dbef.tar.gz
cpython-81d04bcf2124341aa73e5c13c1f1c4bdd3f5dbef.tar.bz2
Fix docstr/comment typos in _use_posix_spawn(). (GH-11684)
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 2300c73..1f6eb63 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -607,17 +607,17 @@ def getoutput(cmd):
def _use_posix_spawn():
- """Check is posix_spawn() can be used for subprocess.
+ """Check if posix_spawn() can be used for subprocess.
- subprocess requires a posix_spawn() implementation that reports properly
- errors to the parent process, set errno on the following failures:
+ subprocess requires a posix_spawn() implementation that properly reports
+ errors to the parent process, & sets errno on the following failures:
- * process attribute actions failed
- * file actions failed
- * exec() failed
+ * Process attribute actions failed.
+ * File actions failed.
+ * exec() failed.
- Prefer an implementation which can use vfork in some cases for best
- performances.
+ Prefer an implementation which can use vfork() in some cases for best
+ performance.
"""
if _mswindows or not hasattr(os, 'posix_spawn'):
# os.posix_spawn() is not available
@@ -642,15 +642,14 @@ def _use_posix_spawn():
# glibc 2.24 has a new Linux posix_spawn implementation using vfork
# which properly reports errors to the parent process.
return True
- # Note: Don't use the POSIX implementation of glibc because it doesn't
+ # Note: Don't use the implementation in earlier glibc because it doesn't
# use vfork (even if glibc 2.26 added a pipe to properly report errors
# to the parent process).
except (AttributeError, ValueError, OSError):
# os.confstr() or CS_GNU_LIBC_VERSION value not available
pass
- # By default, consider that the implementation does not properly report
- # errors.
+ # By default, assume that posix_spawn() does not properly report errors.
return False