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
c3828075
Commit
c3828075
authored
Jul 29, 2014
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #19612: subprocess.communicate() now also ignores EINVAL when using at
least two pipes.
parent
110796fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
Lib/subprocess.py
Lib/subprocess.py
+9
-1
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/subprocess.py
View file @
c3828075
...
...
@@ -1035,7 +1035,15 @@ class Popen(object):
try
:
self
.
stdin
.
write
(
input
)
except
IOError
as
e
:
if
e
.
errno
!=
errno
.
EPIPE
:
if
e
.
errno
==
errno
.
EPIPE
:
# communicate() should ignore broken pipe error
pass
elif
(
e
.
errno
==
errno
.
EINVAL
and
self
.
poll
()
is
not
None
):
# Issue #19612: stdin.write() fails with EINVAL
# if the process already exited before the write
pass
else
:
raise
self
.
stdin
.
close
()
...
...
Misc/NEWS
View file @
c3828075
...
...
@@ -13,6 +13,9 @@ Core and Builtins
Library
-------
- Issue #19612: subprocess.communicate() now also ignores EINVAL when using at
least two pipes.
- Fix repr(_socket.socket) on Windows 64-bit: don'
t
fail
with
OverflowError
on
closed
socket
.
...
...
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