]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): Don't worry about POSIXLY_CORRECT.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 15 Jul 2005 21:55:13 +0000 (21:55 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 15 Jul 2005 21:55:13 +0000 (21:55 +0000)
src/nohup.c

index 6cf9c9b78af6fcae4bb53bae6c8ee1a25a2a7d9d..b8b8c76b08d9134d860ca08e4e2e422e9421bb63 100644 (file)
@@ -97,12 +97,8 @@ main (int argc, char **argv)
       usage (NOHUP_FAILURE);
     }
 
-  /* If standard input is a tty, replace it with a file descriptor
-     that exists but gives you an error if you try to read it.  POSIX
-     requires nohup to leave standard input alone, but that's less
-     useful in practice as it causes a "nohup foo & exit" session to
-     hang with OpenSSH.  */
-  if (!getenv ("POSIXLY_CORRECT") && isatty (STDIN_FILENO))
+  /* If standard input is a tty, replace it with /dev/null.  */
+  if (isatty (STDIN_FILENO))
     fd_reopen (STDIN_FILENO, "/dev/null", O_WRONLY, 0);
 
   /* If standard output is a tty, redirect it (appending) to a file.