summaryrefslogtreecommitdiff
path: root/src/rmdir.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-05-13 06:49:53 +0000
committerJim Meyering <jim@meyering.net>2000-05-13 06:49:53 +0000
commit81b16373ae2acf0e585e30b91b0a0dd1ac7883fb (patch)
treebccefed8e59f303dab8b81114d1754977959da7a /src/rmdir.c
parent47827e2ec298a2d9ab0fb5b367654bb14f080921 (diff)
downloadcoreutils-81b16373ae2acf0e585e30b91b0a0dd1ac7883fb.tar.xz
Arrange to call close_stdout only upon exit.
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)