Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c425d2f

Browse files
committed
Make stdin unbuffered too, when PYTHONUNBUFFERED is specified.
1 parent 57ba4f3 commit c425d2f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Python/frozenmain.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Py_FrozenMain(argc, argv)
5151
unbuffered = 1;
5252

5353
if (unbuffered) {
54+
setbuf(stdin, (char *)NULL);
5455
setbuf(stdout, (char *)NULL);
5556
setbuf(stderr, (char *)NULL);
5657
}

0 commit comments

Comments
 (0)