summaryrefslogtreecommitdiffstats
path: root/Doc/library/subprocess.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2014-09-21 19:10:56 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2014-09-21 19:10:56 (GMT)
commitafe8d0646c9347960e99f5373d6cbd712b5376bb (patch)
tree1ece533b911f8668dd96e22f6d30e0d78a310c89 /Doc/library/subprocess.rst
parent3f40c40dea5f68fa4f1711c9cfa04c4edf6f8f53 (diff)
downloadcpython-afe8d0646c9347960e99f5373d6cbd712b5376bb.zip
cpython-afe8d0646c9347960e99f5373d6cbd712b5376bb.tar.gz
cpython-afe8d0646c9347960e99f5373d6cbd712b5376bb.tar.bz2
Issue #21332: Ensure that ``bufsize=1`` in subprocess.Popen() selects line buffering, rather than block buffering.
Diffstat (limited to 'Doc/library/subprocess.rst')
-rw-r--r--Doc/library/subprocess.rst18
1 files changed, 12 insertions, 6 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index 854993c..b2238f0 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -406,12 +406,18 @@ functions.
Read the `Security Considerations`_ section before using ``shell=True``.
- *bufsize* will be supplied as the corresponding argument to the :func:`open`
- function when creating the stdin/stdout/stderr pipe file objects: :const:`0`
- means unbuffered (read and write are one system call and can return short),
- :const:`1` means line buffered, any other positive value means use a buffer
- of approximately that size. A negative bufsize (the default) means the
- system default of io.DEFAULT_BUFFER_SIZE will be used.
+ *bufsize* will be supplied as the corresponding argument to the
+ :func:`open` function when creating the stdin/stdout/stderr pipe
+ file objects:
+
+ - :const:`0` means unbuffered (read and write are one
+ system call and can return short)
+ - :const:`1` means line buffered
+ (only usable if ``universal_newlines=True`` i.e., in a text mode)
+ - any other positive value means use a buffer of approximately that
+ size
+ - negative bufsize (the default) means the system default of
+ io.DEFAULT_BUFFER_SIZE will be used.
.. versionchanged:: 3.3.1
*bufsize* now defaults to -1 to enable buffering by default to match the