From 2d4fd1ab6e69af49756ced43d0fe1b8bb07ae174 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 7 May 2000 14:57:24 +0000 Subject: Include "closeout.h". (main): Call atexit with close_stdout. --- src/printf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/printf.c') diff --git a/src/printf.c b/src/printf.c index a4253f4a9..75b662fe6 100644 --- a/src/printf.c +++ b/src/printf.c @@ -526,6 +526,8 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); + atexit (close_stdout); + exit_status = 0; /* Don't recognize --help or --version if POSIXLY_CORRECT is set. */ @@ -555,7 +557,5 @@ main (int argc, char **argv) if (argc > 0) error (0, 0, _("warning: excess arguments have been ignored")); - close_stdout (); - exit (exit_status); } -- cgit v1.2.3-70-g09d2