summaryrefslogtreecommitdiff
path: root/src/rm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rm.c')
-rw-r--r--src/rm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rm.c b/src/rm.c
index 92684b485..8d80df86b 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -104,7 +104,6 @@ use one of these commands:\n\
"),
program_name, program_name);
puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
- close_stdout ();
}
exit (status);
}
@@ -132,6 +131,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
rm_option_init (&x);
while ((c = getopt_long (argc, argv, "dfirvR", long_opts, NULL)) != -1)
@@ -195,7 +196,5 @@ main (int argc, char **argv)
remove_fini ();
- if (x.verbose)
- close_stdout ();
exit (fail);
}