summaryrefslogtreecommitdiff
path: root/src/rmdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rmdir.c')
-rw-r--r--src/rmdir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rmdir.c b/src/rmdir.c
index f4a8a3d67..8bd921716 100644
--- a/src/rmdir.c
+++ b/src/rmdir.c
@@ -157,7 +157,6 @@ Remove the DIRECTORY(ies), if they are empty.\n\
--version output version information and exit\n\
"));
puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
- close_stdout ();
}
exit (status);
}
@@ -173,6 +172,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
empty_paths = 0;
while ((optc = getopt_long (argc, argv, "p", longopts, NULL)) != -1)