Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Lib/subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,10 +720,11 @@ def _communicate(self, input):
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
elif e.errno == errno.EINVAL:
# bpo-19612, bpo-30418: On Windows, stdin.write()
# fails with EINVAL if the child process exited or
# if the child process is still running but closed
# the pipe.
pass
else:
raise
Expand Down
3 changes: 3 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ Extension Modules
Library
-------

- bpo-30418: On Windows, subprocess.Popen.communicate() now also ignore EINVAL
on stdin.write() if the child process is still running but closed the pipe.

- bpo-30378: Fix the problem that logging.handlers.SysLogHandler cannot
handle IPv6 addresses.

Expand Down