mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-21 03:12:48 +02:00
(main): Ignore fd_reopen return value when ignoring input, since
we've closed input at that point so we are ignoring input.
This commit is contained in:
@@ -112,8 +112,8 @@ main (int argc, char **argv)
|
||||
to ensure any read evokes an error. */
|
||||
if (ignoring_input)
|
||||
{
|
||||
if (0 <= fd_reopen (STDIN_FILENO, "/dev/null", O_WRONLY, 0)
|
||||
&& !redirecting_stdout && !redirecting_stderr)
|
||||
fd_reopen (STDIN_FILENO, "/dev/null", O_WRONLY, 0);
|
||||
if (!redirecting_stdout && !redirecting_stderr)
|
||||
error (0, 0, _("ignoring input"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user