[chuck-users] chout and cherr confuse me [BUG?]
tom at alltom.com
Tue Oct 20 15:16:53 EDT 2009
2009/10/20 Kassen <signal.automatique at gmail.com>:
> It seems to me that chout has some sort of internal buffer and that it takes
> two chout commands to reach the actual console, instead of one, like I
> expected. It also seems like cherr has a higher priority of some sort. maybe
> cherr commands print immediately while chout ones are delayed until time is
> I'd like to know what the intended behaviour is as I'm now just guessing
> about the difference between the two. Right now I'm leaning towards
> suspecting at least a bug in chout.
Although they end up in the same terminal, stdout and stderr are
separate output streams with separate buffers that will flush at
different times. This is why you can redirect chuck's stdout like
"chuck file.ck > output.txt" and lines to stderr still appear. You
cannot get consistent ordering of output on the two streams.
I'm not saying there's nothing special going on with chout and cherr,
but that the behavior you're describing is to be expected in general.
More information about the chuck-users