[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

22.4 nohup: Run a command immune to hangups

nohup runs the given command with hangup signals ignored, so that the command can continue running in the background after you log out. Synopsis:

 
nohup command [arg]...

If standard output is a terminal, it is redirected so that it is appended to the file `nohup.out'; if that cannot be written to, it is appended to the file `$HOME/nohup.out'. If that cannot be written to, the command is not run.

If nohup creates either `nohup.out' or `$HOME/nohup.out', it creates it with no "group" or "other" access permissions. It does not change the permissions if the output file already existed.

If standard error is a terminal, it is redirected to the same file descriptor as the standard output.

nohup does not automatically put the command it runs in the background; you must do that explicitly, by ending the command line with an `&'. Also, nohup does not change the scheduling priority of command; use nice for that, e.g., `nohup nice command'.

The only options are `--help' and `--version'. See section 2. Common options.

Exit status:

 
126 if command was found but could not be invoked
127 if nohup itself failed or if command could not be found
the exit status of command otherwise



This document was generated by Jeff Bailey on December, 28 2002 using texi2html