mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #21332: Ensure that `bufsize=1
` in subprocess.Popen() selects line buffering, rather than block buffering.
This commit is contained in:
parent
3f40c40dea
commit
afe8d0646c
4 changed files with 50 additions and 7 deletions
|
@ -837,7 +837,8 @@ class Popen(object):
|
|||
if p2cwrite != -1:
|
||||
self.stdin = io.open(p2cwrite, 'wb', bufsize)
|
||||
if universal_newlines:
|
||||
self.stdin = io.TextIOWrapper(self.stdin, write_through=True)
|
||||
self.stdin = io.TextIOWrapper(self.stdin, write_through=True,
|
||||
line_buffering=(bufsize == 1))
|
||||
if c2pread != -1:
|
||||
self.stdout = io.open(c2pread, 'rb', bufsize)
|
||||
if universal_newlines:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue