From 3684b16708e1b4e9aa6fdfb691ebe0ffbe04f493 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 5 May 2000 21:41:29 +0000 Subject: [PATCH] Exit nonzero upon write failure. Include "closeout.h". (main): Call close_stdout. Reported by Ian Jackson via Michael Stone. --- src/printf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/printf.c b/src/printf.c index 66aa7dd..a4253f4 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); } -- 2.7.4