]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Exit nonzero upon write failure.
authorJim Meyering <jim@meyering.net>
Fri, 5 May 2000 21:41:29 +0000 (21:41 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 5 May 2000 21:41:29 +0000 (21:41 +0000)
Include "closeout.h".
(main): Call close_stdout.
Reported by Ian Jackson via Michael Stone.

src/printf.c

index 66aa7dda54735c82177e8e0e97118f5a5c780b60..a4253f4a96c557ff52a0297315f243720decff17 100644 (file)
@@ -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);
 }