From 195689e7c760ab49ae21885bd9e533ed65c83d16 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 23 Mar 2006 23:56:34 +0000 Subject: [PATCH] (main): Ignore fd_reopen return value when ignoring input, since we've closed input at that point so we are ignoring input. --- src/nohup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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")); } -- 2.47.3