diff options
author | Sami Kerola | 2012-04-04 19:44:04 +0200 |
---|---|---|
committer | Sami Kerola | 2012-04-04 19:46:25 +0200 |
commit | cdd2a8c360c70d16804ace7cc923a6c6bb7c9ca9 (patch) | |
tree | 6e4b7254c8179edc8b8f3f1c0908f7e966732b49 /term-utils/write.c | |
parent | text-utils: verify writing to streams was successful (diff) | |
download | kernel-qcow2-util-linux-cdd2a8c360c70d16804ace7cc923a6c6bb7c9ca9.tar.gz kernel-qcow2-util-linux-cdd2a8c360c70d16804ace7cc923a6c6bb7c9ca9.tar.xz kernel-qcow2-util-linux-cdd2a8c360c70d16804ace7cc923a6c6bb7c9ca9.zip |
term-utils: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'term-utils/write.c')
-rw-r--r-- | term-utils/write.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/term-utils/write.c b/term-utils/write.c index a70eb7bd1..2a94792e0 100644 --- a/term-utils/write.c +++ b/term-utils/write.c @@ -59,8 +59,10 @@ #include <paths.h> #include <asm/param.h> #include <getopt.h> + #include "c.h" #include "carefulputc.h" +#include "closestream.h" #include "nls.h" static void __attribute__ ((__noreturn__)) usage(FILE * out); @@ -103,6 +105,7 @@ int main(int argc, char **argv) setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + atexit(close_stdout); while ((c = getopt_long(argc, argv, "Vh", longopts, NULL)) != -1) switch (c) { |