summaryrefslogtreecommitdiff
path: root/src/chgrp.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/chgrp.c
parent47827e2ec298a2d9ab0fb5b367654bb14f080921 (diff)
downloadcoreutils-81b16373ae2acf0e585e30b91b0a0dd1ac7883fb.tar.xz
Arrange to call close_stdout only upon exit.
Diffstat (limited to 'src/chgrp.c')
-rw-r--r--src/chgrp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/chgrp.c b/src/chgrp.c
index 889b82596..ed629fec3 100644
--- a/src/chgrp.c
+++ b/src/chgrp.c
@@ -1,5 +1,5 @@
/* chgrp -- change group ownership 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
@@ -356,7 +356,6 @@ Change the group membership of each FILE to GROUP.\n\
--version output version information and exit\n\
"));
puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
- close_stdout ();
}
exit (status);
}
@@ -373,6 +372,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
recurse = force_silent = 0;
while ((optc = getopt_long (argc, argv, "Rcfhv", long_options, NULL)) != -1)
@@ -434,7 +435,5 @@ main (int argc, char **argv)
for (; optind < argc; ++optind)
errors |= change_file_group (1, argv[optind], group);
- if (verbosity != V_off)
- close_stdout ();
exit (errors);
}