[Qt-interest] Coordinating stderr between processes in a pipe train
Martin Gebert
martin.gebert at alpha-bit.de
Tue Jul 14 14:57:59 CEST 2009
> Given the above commandline, sometimes everything looks OK
> (the order is not
> important for my purposes):
>
> xx 0
> cc 0
> ERROR 0
> dd 0
>
> Other times, it gets garbled (it can get much worse than this):
>
> cxc 0
> Ex 0
> RROR 0
> dd 0
Usually stdout is buffered, delaying the output for an unspecified, short
time, while stderr is unbuffered in order to display messages immediately.
Thus I can imagine that in some cases the writing routines of stdout are
interrupted by stderr, showing the results above. If you want both streams
be serialized you should think about redirecting one to the other (resp. use
one of them for both out and err).
Martin
More information about the Qt-interest-old
mailing list