diff options
author | Sami Kerola | 2012-04-04 19:39:15 +0200 |
---|---|---|
committer | Sami Kerola | 2012-04-04 19:45:41 +0200 |
commit | b87cbe8486a2799a137c8100afaa05b352bb0ccf (patch) | |
tree | c8e0653333e146b91460e74c3902652c5eb9e024 /text-utils/hexdump.c | |
parent | include: add stream error checking facility (diff) | |
download | kernel-qcow2-util-linux-b87cbe8486a2799a137c8100afaa05b352bb0ccf.tar.gz kernel-qcow2-util-linux-b87cbe8486a2799a137c8100afaa05b352bb0ccf.tar.xz kernel-qcow2-util-linux-b87cbe8486a2799a137c8100afaa05b352bb0ccf.zip |
text-utils: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'text-utils/hexdump.c')
-rw-r--r-- | text-utils/hexdump.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/text-utils/hexdump.c b/text-utils/hexdump.c index 7edb053db..6f5335900 100644 --- a/text-utils/hexdump.c +++ b/text-utils/hexdump.c @@ -43,6 +43,7 @@ #include "nls.h" #include "c.h" +#include "closestream.h" FS *fshead; /* head of format strings */ int blocksize; /* data block size */ @@ -57,6 +58,7 @@ int main(int argc, char **argv) setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + atexit(close_stdout); if (!(p = strrchr(argv[0], 'o')) || strcmp(p, "od")) { newsyntax(argc, &argv); |