From: Paul Eggert Date: Thu, 23 Mar 2006 23:56:34 +0000 (+0000) Subject: (main): Ignore fd_reopen return value when ignoring input, since X-Git-Tag: v6.0~581 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=195689e7c760ab49ae21885bd9e533ed65c83d16;p=thirdparty%2Fcoreutils.git (main): Ignore fd_reopen return value when ignoring input, since we've closed input at that point so we are ignoring input. --- diff --git a/src/nohup.c b/src/nohup.c index 1a99b6cb81..1f8e62bc4f 100644 --- a/src/nohup.c +++ b/src/nohup.c @@ -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")); }