md5sum, sha*sum, sum: line-buffer the printed checksums
authorPádraig Brady <P@draigBrady.com>
Tue, 20 Oct 2009 18:19:58 +0000 (19:19 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 21 Oct 2009 15:56:00 +0000 (16:56 +0100)
commit710fe413fed61aacad4e0124eb7fcebc3a20fb6c
tree20cfd9192502f671e501cbffcc300f40a5b4f10e
parent71adb516deee94274669f968636194bf261b1207
md5sum, sha*sum, sum: line-buffer the printed checksums

* src/md5sum.c (main): Set stdout to line buffered mode
to ensure parallel running instances don't intersperse
their output.  This adds 5% to the run time in the worst case
of many zero length files, or 2% with standard file sizes.
* src/sum.c (main): Likewise.
* tests/misc/md5sum-parallel: New test for atomic output.
* tests/Makefile.am: Reference it.
* NEWS: Mention the fix
NEWS
src/md5sum.c
src/sum.c
tests/Makefile.am
tests/misc/md5sum-parallel [new file with mode: 0755]