summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-07-18 08:38:43 +0000
committerJim Meyering <jim@meyering.net>2003-07-18 08:38:43 +0000
commitec5c04d7d8780c464a827df8ceb97beccacb7abf (patch)
tree7d1284a4caef03f12e0cee3a0ab62fcef49c0566 /src
parentc03aeeae2325c45195d62f7af6af9b30755d3128 (diff)
downloadcoreutils-ec5c04d7d8780c464a827df8ceb97beccacb7abf.tar.xz
(usage): Don't call close_stdout here.
(main): Use close_stdout via atexit. Now `su --version > /dev/full' fails, as it should. Somehow, the change of 2000-05-07 that purports to fix this was not checked in.
Diffstat (limited to 'src')
-rw-r--r--src/su.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/su.c b/src/su.c
index 03dc7d8d5..232103921 100644
--- a/src/su.c
+++ b/src/su.c
@@ -452,7 +452,6 @@ Change the effective user id and group id to that of USER.\n\
A mere - implies -l. If USER not given, assume root.\n\
"), stdout);
printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
- close_stdout ();
}
exit (status);
}
@@ -474,6 +473,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
fast_startup = 0;
simulate_login = 0;
change_environment = 1;