coreutils: nohup invocation
1
1 23.4 ‘nohup’: Run a command immune to hangups
1 =============================================
1
1 ‘nohup’ runs the given COMMAND with hangup signals ignored, so that the
1 command can continue running in the background after you log out.
1 Synopsis:
1
1 nohup COMMAND [ARG]...
1
1 If standard input is a terminal, redirect it so that terminal
1 sessions do not mistakenly consider the terminal to be used by the
1 command. Make the substitute file descriptor unreadable, so that
1 commands that mistakenly attempt to read from standard input can report
1 an error. This redirection is a GNU extension; programs intended to be
1 portable to non-GNU hosts can use ‘nohup COMMAND [ARG]... 0>/dev/null’
1 instead.
1
1 If standard output is a terminal, the command’s standard output is
1 appended to the file ‘nohup.out’; if that cannot be written to, it is
1 appended to the file ‘$HOME/nohup.out’; and if that cannot be written
1 to, the command is not run. Any ‘nohup.out’ or ‘$HOME/nohup.out’ file
1 created by ‘nohup’ is made readable and writable only to the user,
1 regardless of the current umask settings.
1
1 If standard error is a terminal, it is normally redirected to the
1 same file descriptor as the (possibly-redirected) standard output.
1 However, if standard output is closed, standard error terminal output is
1 instead appended to the file ‘nohup.out’ or ‘$HOME/nohup.out’ as above.
1
1 To capture the command’s output to a file other than ‘nohup.out’ you
1 can redirect it. For example, to capture the output of ‘make’:
1
1 nohup make > make.log
1
1 ‘nohup’ does not automatically put the command it runs in the
1 background; you must do that explicitly, by ending the command line with
1 an ‘&’. Also, ‘nohup’ does not alter the niceness of COMMAND; use
1 ‘nice’ for that, e.g., ‘nohup nice COMMAND’.
1
11 COMMAND must not be a special built-in utility (⇒Special
built-in utilities).
1
11 The only options are ‘--help’ and ‘--version’. ⇒Common
options. Options must precede operands.
1
1 Exit status:
1
1 125 if ‘nohup’ itself fails, and ‘POSIXLY_CORRECT’ is not set
1 126 if COMMAND is found but cannot be invoked
1 127 if COMMAND cannot be found
1 the exit status of COMMAND otherwise
1
1 If ‘POSIXLY_CORRECT’ is set, internal failures give status 127
1 instead of 125.
1