Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
81d04bcf
Commit
81d04bcf
authored
Jan 26, 2019
by
Gregory P. Smith
Committed by
GitHub
Jan 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix docstr/comment typos in _use_posix_spawn(). (GH-11684)
parent
d8080c01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
Lib/subprocess.py
Lib/subprocess.py
+10
-11
No files found.
Lib/subprocess.py
View file @
81d04bcf
...
...
@@ -607,17 +607,17 @@ def getoutput(cmd):
def
_use_posix_spawn
():
"""Check i
s
posix_spawn() can be used for subprocess.
"""Check i
f
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
performance
s
.
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment