]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): Ignore fd_reopen return value when ignoring input, since
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 23 Mar 2006 23:56:34 +0000 (23:56 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 23 Mar 2006 23:56:34 +0000 (23:56 +0000)
we've closed input at that point so we are ignoring input.

src/nohup.c

index 1a99b6cb819ce10b8471beea9a51fc6a4b69702f..1f8e62bc4f0c69bff0df03d63f9262393df68077 100644 (file)
@@ -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"));
     }