diff options
author | Eric Blake <ebb9@byu.net> | 2007-08-20 17:01:18 +0200 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2007-08-20 17:03:45 +0200 |
commit | feed02af9d09527745d10138cc08da9ed0702b7e (patch) | |
tree | acf5df1c403e748267ce956baf720e0bbd26ca0e /src | |
parent | a05ae2f7168f42d290512ae919bb9ce4aa4d7063 (diff) | |
download | coreutils-feed02af9d09527745d10138cc08da9ed0702b7e.tar.xz |
Avoid consuming too much seekable input when yesno is used.
* bootstrap.conf (gnulib_modules): Grab closein.
* src/system.h (includes): Also include closein.h.
* src/mv.c (main): Use close_stdin, not close_stdout.
* src/cp.c (main): Likewise.
* src/ln.c (main): Likewise.
* src/rm.c (main): Likewise.
* src/install.c (main): Likewise.
* NEWS: Document the fix.
Diffstat (limited to 'src')
-rw-r--r-- | src/cp.c | 2 | ||||
-rw-r--r-- | src/install.c | 2 | ||||
-rw-r--r-- | src/ln.c | 4 | ||||
-rw-r--r-- | src/mv.c | 2 | ||||
-rw-r--r-- | src/rm.c | 2 | ||||
-rw-r--r-- | src/system.h | 1 |
6 files changed, 7 insertions, 6 deletions
@@ -867,7 +867,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - atexit (close_stdout); + atexit (close_stdin); selinux_enabled = (0 < is_selinux_enabled ()); cp_option_init (&x); diff --git a/src/install.c b/src/install.c index 28e2dd50a..34f61ffba 100644 --- a/src/install.c +++ b/src/install.c @@ -290,7 +290,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - atexit (close_stdout); + atexit (close_stdin); cp_option_init (&x); @@ -1,5 +1,5 @@ /* `ln' program to create links between files. - Copyright (C) 1986, 1989-1991, 1995-2006 Free Software Foundation, Inc. + Copyright (C) 1986, 1989-1991, 1995-2007 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 @@ -398,7 +398,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - atexit (close_stdout); + atexit (close_stdin); /* FIXME: consider not calling getenv for SIMPLE_BACKUP_SUFFIX unless we'll actually use backup_suffix_string. */ @@ -357,7 +357,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - atexit (close_stdout); + atexit (close_stdin); cp_option_init (&x); @@ -238,7 +238,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - atexit (close_stdout); + atexit (close_stdin); rm_option_init (&x); diff --git a/src/system.h b/src/system.h index 3c7f49d10..2c4bfd345 100644 --- a/src/system.h +++ b/src/system.h @@ -419,6 +419,7 @@ enum #define VERSION_OPTION_DESCRIPTION \ _(" --version output version information and exit\n") +#include "closein.h" #include "closeout.h" #include "version-etc.h" |