[issue22443] read(1) blocks on unflushed output

Sworddragon report at bugs.python.org
Fri Sep 19 16:26:36 CEST 2014


Sworddragon added the comment:

> The buffering of stdout and/or stderr of your application probably
> changes if the application runs in a terminal (TTY) or if the output is
> redirected to a pipe (not a TTY). Set the setvbuf() function.

This means in the worst case there is currently no official way to get this output before it writes a newline?


> You can try my hack to disable buffering using LD_PRELOAD:
> https://bitbucket.org/haypo/misc/src/4d133ea3e46550808305b093557ee51d2de2ac9f/misc/nobuffer.c?at=default

I will try later if I can successfully compile Python with this hack.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22443>
_______________________________________


More information about the Python-bugs-list mailing list