From: Jim Meyering Date: Sun, 7 May 2000 14:52:54 +0000 (+0000) Subject: Include "closeout.h". X-Git-Tag: SH-UTILS-2_0h~14 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=21f7f8fb60ff3a69eb3095e7700b1890d080e8c9;p=thirdparty%2Fcoreutils.git Include "closeout.h". (main): Call atexit with close_stdout. --- diff --git a/src/factor.c b/src/factor.c index 63fbcfdb4f..b029b89a2f 100644 --- a/src/factor.c +++ b/src/factor.c @@ -182,6 +182,8 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); + atexit (close_stdout); + parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, AUTHORS, usage); /* The above handles --help and --version. @@ -204,7 +206,5 @@ main (int argc, char **argv) if (fail) usage (1); - close_stdout (); - exit (fail); }