summaryrefslogtreecommitdiff
path: root/src/chmod.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/chmod.c
parent47827e2ec298a2d9ab0fb5b367654bb14f080921 (diff)
downloadcoreutils-81b16373ae2acf0e585e30b91b0a0dd1ac7883fb.tar.xz
Arrange to call close_stdout only upon exit.
Diffstat (limited to 'src/chmod.c')
-rw-r--r--src/chmod.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/chmod.c b/src/chmod.c
index 14ad4d5cd..5d6a9b163 100644
--- a/src/chmod.c
+++ b/src/chmod.c
@@ -1,5 +1,5 @@
/* chmod -- change permission modes of files
- Copyright (C) 89, 90, 91, 1995-1999 Free Software Foundation, Inc.
+ Copyright (C) 89, 90, 91, 1995-2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -263,7 +263,6 @@ Each MODE is one or more of the letters ugoa, one of the symbols +-= and\n\
one or more of the letters rwxXstugo.\n\
"));
puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
- close_stdout ();
}
exit (status);
}
@@ -285,6 +284,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
recurse = force_silent = 0;
while (1)
@@ -364,7 +365,5 @@ main (int argc, char **argv)
errors |= change_file_mode (argv[optind], changes, 1);
}
- if (verbosity != V_off)
- close_stdout ();
exit (errors);
}