summaryrefslogtreecommitdiffstats
path: root/misc-utils/whereis.c
diff options
context:
space:
mode:
authorSami Kerola2012-04-04 19:56:48 +0200
committerSami Kerola2012-04-04 19:56:48 +0200
commitc05a80ca6385b85c30094390f31615152adfed2e (patch)
tree387668598263f1a9034e7c70c1c299016091f759 /misc-utils/whereis.c
parentmount: verify writing to streams was successful (diff)
downloadkernel-qcow2-util-linux-c05a80ca6385b85c30094390f31615152adfed2e.tar.gz
kernel-qcow2-util-linux-c05a80ca6385b85c30094390f31615152adfed2e.tar.xz
kernel-qcow2-util-linux-c05a80ca6385b85c30094390f31615152adfed2e.zip
misc-utils: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'misc-utils/whereis.c')
-rw-r--r--misc-utils/whereis.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/misc-utils/whereis.c b/misc-utils/whereis.c
index 4a123f1a7..6807b8a68 100644
--- a/misc-utils/whereis.c
+++ b/misc-utils/whereis.c
@@ -53,6 +53,7 @@
#include "xalloc.h"
#include "nls.h"
#include "c.h"
+#include "closestream.h"
static char *bindirs[] = {
"/bin",
@@ -417,6 +418,7 @@ main(int argc, char **argv)
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
+ atexit(close_stdout);
argc--, argv++;
if (argc == 0)