Message227098
> On reading the output of an application (for example "apt-get download firefox") that dynamically changes a line (possibly with the terminal control character \r) I have noticed that read(1) does not read the output until it has finished with a newline.
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.
You can try my hack to disable buffering using LD_PRELOAD:
https://bitbucket.org/haypo/misc/src/4d133ea3e46550808305b093557ee51d2de2ac9f/misc/nobuffer.c?at=default |
|
Date |
User |
Action |
Args |
2014-09-19 14:10:59 | vstinner | set | recipients:
+ vstinner, Sworddragon |
2014-09-19 14:10:59 | vstinner | set | messageid: <1411135859.34.0.502791535342.issue22443@psf.upfronthosting.co.za> |
2014-09-19 14:10:59 | vstinner | link | issue22443 messages |
2014-09-19 14:10:59 | vstinner | create | |
|