From: Paul Eggert Date: Fri, 27 Mar 2015 22:01:35 +0000 (-0700) Subject: nohup: clarify stdin redirection X-Git-Tag: v8.24~93 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9b2782ca6dcdb756322d50e9ce8f54b50c24ea3e;p=thirdparty%2Fcoreutils.git nohup: clarify stdin redirection Problem reported by Isaac Schwabacher in: http://bugs.gnu.org/20214 * doc/coreutils.texi (nohup invocation): Clarify that when nohup's stdin gets redirected, it's unreadable. * doc/coreutils.texi (nohup invocation): * src/nohup.c (usage): Don't promise /dev/null. --- diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 6110cecd0d..3cbce63c99 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -16714,12 +16714,13 @@ out. Synopsis: nohup @var{command} [@var{arg}]@dots{} @end example -If standard input is a terminal, it is redirected from -@file{/dev/null} so that terminal sessions do not mistakenly consider -the terminal to be used by the command. This is a GNU -extension; programs intended to be portable to non-GNU hosts -should use @samp{nohup @var{command} [@var{arg}]@dots{} /dev/null} instead. @flindex nohup.out If standard output is a terminal, the command's standard output is appended diff --git a/src/nohup.c b/src/nohup.c index 9bc868604b..8cdacedb8a 100644 --- a/src/nohup.c +++ b/src/nohup.c @@ -63,7 +63,7 @@ Run COMMAND, ignoring hangup signals.\n\ fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); printf (_("\n\ -If standard input is a terminal, redirect it from /dev/null.\n\ +If standard input is a terminal, redirect it from an unreadable file.\n\ If standard output is a terminal, append output to 'nohup.out' if possible,\n\ '$HOME/nohup.out' otherwise.\n\ If standard error is a terminal, redirect it to standard output.\n\