]> git.ipfire.org Git - thirdparty/coreutils.git/commit
csplit: check and report fwrite errors with errno
authorAssaf Gordon <assafgordon@gmail.com>
Thu, 12 Nov 2015 10:20:29 +0000 (05:20 -0500)
committerAssaf Gordon <assafgordon@gmail.com>
Thu, 12 Nov 2015 20:17:55 +0000 (15:17 -0500)
commit4c5c6cad85ad67d96df261ec9abdab66590d9ceb
treec73bb9ec4a84db74db3c511b19fb6353c5915406
parent0daa359de8edd09fe2df76cb26c7cef16da52ce3
csplit: check and report fwrite errors with errno

discussed in:
http://lists.gnu.org/archive/html/coreutils/2015-10/msg00091.html

* src/csplit.c: (save_line_to_file): check fwrite failures, report
  and exit immediately instead of deferring to 'close_output'.
* tests/misc/csplit-io-err.sh: test fwrite failure using LD_PRELOAD.
* tests/local.mk: add new test.
src/csplit.c
tests/local.mk
tests/misc/csplit-io-err.sh [new file with mode: 0755]