summaryrefslogtreecommitdiff
path: root/src/du.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/du.c
parent47827e2ec298a2d9ab0fb5b367654bb14f080921 (diff)
downloadcoreutils-81b16373ae2acf0e585e30b91b0a0dd1ac7883fb.tar.xz
Arrange to call close_stdout only upon exit.
Diffstat (limited to 'src/du.c')
-rw-r--r--src/du.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/du.c b/src/du.c
index 5729e9424..6c6e451c3 100644
--- a/src/du.c
+++ b/src/du.c
@@ -227,7 +227,6 @@ Summarize disk usage of each FILE, recursively for directories.\n\
--version output version information and exit\n\
"));
puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
- close_stdout ();
}
exit (status);
}
@@ -656,6 +655,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
exclude = new_exclude ();
xstat = lstat;
@@ -783,6 +784,5 @@ main (int argc, char **argv)
du_files (optind == argc ? cwd_only : argv + optind);
- close_stdout ();
exit (exit_status);
}