summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-05-05 21:41:29 +0000
committerJim Meyering <jim@meyering.net>2000-05-05 21:41:29 +0000
commit3684b16708e1b4e9aa6fdfb691ebe0ffbe04f493 (patch)
tree4f03d90cc202b58a9483cb7c58482966a8bc6ce5 /src
parent7dad7fd5c6d1d0cc1013444d50b6fc5a9d16be65 (diff)
downloadcoreutils-3684b16708e1b4e9aa6fdfb691ebe0ffbe04f493.tar.xz
Exit nonzero upon write failure.
Include "closeout.h". (main): Call close_stdout. Reported by Ian Jackson via Michael Stone.
Diffstat (limited to 'src')
-rw-r--r--src/printf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/printf.c b/src/printf.c
index 66aa7dda5..a4253f4a9 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -53,6 +53,7 @@
#include "system.h"
#include "long-options.h"
#include "error.h"
+#include "closeout.h"
#include "unicodeio.h"
/* The official name of this program (e.g., no `g' prefix). */
@@ -554,5 +555,7 @@ main (int argc, char **argv)
if (argc > 0)
error (0, 0, _("warning: excess arguments have been ignored"));
+ close_stdout ();
+
exit (exit_status);
}