summaryrefslogtreecommitdiff
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
authorJendrik Seipp <jendrikseipp@gmail.com>2020-01-01 23:21:43 +0100
committerAntoine Pitrou <antoine@python.org>2020-01-01 23:21:43 +0100
commit5b9077134cd0535f21905d5f5195847526cac99c (patch)
tree4bed1fd2a5350e003816b1cc05a474d903efedcc /Python/pylifecycle.c
parent46abfc1416ff8e450999611ef8f231ff871ab133 (diff)
downloadcpython-git-5b9077134cd0535f21905d5f5195847526cac99c.tar.gz
bpo-13601: always use line-buffering for sys.stderr (GH-17646)
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 4f05dfc349..94bbbdb560 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1817,7 +1817,7 @@ create_stdio(const PyConfig *config, PyObject* io,
write_through = Py_True;
else
write_through = Py_False;
- if (isatty && buffered_stdio)
+ if (buffered_stdio && (isatty || fd == fileno(stderr)))
line_buffering = Py_True;
else
line_buffering = Py_False;