summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/factor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/factor.c b/src/factor.c
index 63fbcfdb4..b029b89a2 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);
}