mktemp: don't leave file behind on write failure
commit41b3a8ed8b2480ca12baaa6c692a7fba3ebd53cf
authorEric Blake <ebb9@byu.net>
Wed, 4 Nov 2009 21:02:20 +0000 (4 14:02 -0700)
committerEric Blake <ebb9@byu.net>
Thu, 5 Nov 2009 13:53:21 +0000 (5 06:53 -0700)
treea75c662443607e08f1d457081957bd4cf25bdbc1
parentcd65f11c4f5fbfff1f35df56d8afa708c8ac2066
mktemp: don't leave file behind on write failure

* src/mktemp.c (main): Remove just-created file if stdout had
problems.
* bootstrap.conf (gnulib_modules): Add remove.
* tests/misc/close-stdout: Test it.
* NEWS: Document it.
NEWS
bootstrap.conf
src/mktemp.c
tests/misc/close-stdout