summaryrefslogtreecommitdiff
path: root/src/nohup.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-03-23 23:56:34 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-03-23 23:56:34 +0000
commit195689e7c760ab49ae21885bd9e533ed65c83d16 (patch)
tree507deb240c3e46fdd6f7c8fbe75db4a60f5d974c /src/nohup.c
parent7a88cb696fdb0f9ca2ba184bb1f882675121984a (diff)
downloadcoreutils-195689e7c760ab49ae21885bd9e533ed65c83d16.tar.xz
(main): Ignore fd_reopen return value when ignoring input, since
we've closed input at that point so we are ignoring input.
Diffstat (limited to 'src/nohup.c')
-rw-r--r--src/nohup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nohup.c b/src/nohup.c
index 1a99b6cb8..1f8e62bc4 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"));
}