From: Jim Meyering Date: Fri, 5 May 2000 21:41:29 +0000 (+0000) Subject: Exit nonzero upon write failure. X-Git-Tag: SH-UTILS-2_0h~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3684b16708e1b4e9aa6fdfb691ebe0ffbe04f493;p=thirdparty%2Fcoreutils.git Exit nonzero upon write failure. Include "closeout.h". (main): Call close_stdout. Reported by Ian Jackson via Michael Stone. --- diff --git a/src/printf.c b/src/printf.c index 66aa7dda54..a4253f4a96 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); }