]> git.ipfire.org Git - thirdparty/coreutils.git/commit
dd: synchronize output after write errors
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 28 Jan 2022 08:01:07 +0000 (00:01 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 28 Jan 2022 08:01:55 +0000 (00:01 -0800)
commit50e438972b8f6e4c7486c38beb542539de0298c7
treeee778c0356d71ab1d177c1bb6c4298642e31f97c
parentc4f9554ee923c27529cdb76b6f75051183f59c1a
dd: synchronize output after write errors

Problem reported by Sworddragon (Bug#51345).
* src/dd.c (cleanup): Synchronize output unless dd has been interrupted.
(synchronize_output): New function, split out from dd_copy.
Update conversions_mask so synchronization is done at most once.
(main): Do not die with the output file open, since we want to be
able to synchronize it before exiting.  Synchronize output before
exiting.
NEWS
doc/coreutils.texi
src/dd.c