diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-10-17 11:49:07 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-10-17 11:49:07 -0400 |
commit | 53c35a635276bb78f098947755dd072b5b800358 (patch) | |
tree | 8dd1d4a33df25d24d624aa6d238e2052231311f4 /chronic | |
parent | 1173bd9f10d731485f3b63f1c7ff55eb9c58a605 (diff) | |
download | moreutils-53c35a635276bb78f098947755dd072b5b800358.tar.gz |
chronic: Flush output more often to better preserve stdout,err ordering.
Particularly when a chunk that is not newline-terminated is read,
this makes it be flushed right away.
Thanks, Miroslav Ĺ ustek
Diffstat (limited to 'chronic')
-rwxr-xr-x | chronic | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -86,7 +86,9 @@ else { sub showout { print "STDOUT:\n" if $opt_v; print STDOUT $out; + STDOUT->flush(); print "\nSTDERR:\n" if $opt_v; print STDERR $err; + STDERR->flush(); print "\nRETVAL: ".($ret >> 8)."\n" if $opt_v; } |