mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Issue #21332: Ensure that `bufsize=1` in subprocess.Popen() selects line buffering, rather than block buffering.
This commit is contained in:
commit
6e311aa748
4 changed files with 50 additions and 7 deletions
|
|
@ -841,7 +841,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