diff options
| author | Jim Meyering <jim@meyering.net> | 2000-05-05 21:41:29 +0000 |
|---|---|---|
| committer | Jim Meyering <jim@meyering.net> | 2000-05-05 21:41:29 +0000 |
| commit | 3684b16708e1b4e9aa6fdfb691ebe0ffbe04f493 (patch) | |
| tree | 4f03d90cc202b58a9483cb7c58482966a8bc6ce5 /src/printf.c | |
| parent | *** empty log message *** (diff) | |
| download | coreutils-3684b16708e1b4e9aa6fdfb691ebe0ffbe04f493.tar.gz coreutils-3684b16708e1b4e9aa6fdfb691ebe0ffbe04f493.zip | |
Exit nonzero upon write failure.
Include "closeout.h".
(main): Call close_stdout.
Reported by Ian Jackson via Michael Stone.
Diffstat (limited to 'src/printf.c')
| -rw-r--r-- | src/printf.c | 3 |
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); } |
