[pacman-dev] Feature Request: line buffering for stdout/stderr even when they're not tty
I wanted to make some analysis of the output of -Qkk and wanted to pipe both stdout and stderr to a grep pipeline pacman -Qkk 2>&1 | ... but it seems when stdout/stderr is not a tty pacman (or some lib) started using bigger, not line oriented buffers so the output got badly interwoven. -- damjan
On Mon, May 20, 2013 at 10:36 AM, Damjan Georgievski <gdamjan@gmail.com> wrote:
I wanted to make some analysis of the output of -Qkk and wanted to pipe both stdout and stderr to a grep pipeline
pacman -Qkk 2>&1 | ...
but it seems when stdout/stderr is not a tty pacman (or some lib) started using bigger, not line oriented buffers so the output got badly interwoven.
Sounds like we need to address the fact that we are using both stdout and stderr at the same time and ordering matters, rather than forcing line-buffered output. -Dan
On 21.05.2013 16:16, Dan McGee wrote:
On Mon, May 20, 2013 at 10:36 AM, Damjan Georgievski <gdamjan@gmail.com> wrote:
I wanted to make some analysis of the output of -Qkk and wanted to pipe both stdout and stderr to a grep pipeline
pacman -Qkk 2>&1 | ...
but it seems when stdout/stderr is not a tty pacman (or some lib) started using bigger, not line oriented buffers so the output got badly interwoven.
Sounds like we need to address the fact that we are using both stdout and stderr at the same time and ordering matters, rather than forcing line-buffered output.
ok, I thought that was on purpose -- дамјан
create two named pipes and compile [0], perfect - that is, if you don't mind bash's job output. :-) hmm, one might easily enough extend the program to fork() and exec() inside and make it usable in a sudo/xargs kind of way... [0] http://sprunge.us/XaMf?c cheers! mar77i
participants (4)
-
Damjan
-
Damjan Georgievski
-
Dan McGee
-
Martti Kühne