summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-05-07 14:57:24 +0000
committerJim Meyering <jim@meyering.net>2000-05-07 14:57:24 +0000
commit2d4fd1ab6e69af49756ced43d0fe1b8bb07ae174 (patch)
treec6d23e353196dee3d46819992d307167ac80de50 /src
parentc4d7de4d1c9f92da230cf0514a49e5c5ef117c36 (diff)
downloadcoreutils-2d4fd1ab6e69af49756ced43d0fe1b8bb07ae174.tar.xz
Include "closeout.h".
(main): Call atexit with close_stdout.
Diffstat (limited to 'src')
-rw-r--r--src/printf.c4
1 files changed, 2 insertions, 2 deletions
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);
}