summaryrefslogtreecommitdiff
path: root/src/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/printf.c')
-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);
}