DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

nohup(C)


nohup -- run a command immune to hangups and quits

Syntax

nohup command [ arguments ]

Description

The nohup command executes command with hangups ignored. If output is not redirected by the user, it will be appended to nohup.out. If the user does not have write permission in the current directory, output is redirected to $HOME/nohup.out. If neither file can be created or opened for appending, command is not invoked.

If the nohup.out file does not exist, it is created only with user read and write permissions.

The nohup utility returns the same exit status as the command. However, if the command was found but could not be executed, or the command could not be found, nohup returns an exit status of 126 or 127 respectively.

Exit values

nohup returns the following values:

126
command could be found but not invoked

127
command could not be found
Otherwise, the exit status of nohup is the same as that of the command operand.

Limitations

The nohup standalone program is used by the Bourne shell. The C shell implements nohup as a built-in command; the Korn shell aliases nohup. For further details see sh(C), csh(C), and ksh(C).

nohup cannot be used to set up a background process that needs to read from or write to the controlling terminal; this causes command to terminate with EIO set in errno. An example would be a program, initially set up over a modem line, and intended to service incoming calls on that line. In such a case, the setpgrp(C) command should be used instead.

See also

kill(C), nice(C), setpgrp(C), signal(S)

Standards conformance

nohup is conformant with:

ISO/IEC DIS 9945-2:1992, Information technology - Portable Operating System Interface (POSIX) - Part 2: Shell and Utilities (IEEE Std 1003.2-1992);
AT&T SVID Issue 2;
X/Open CAE Specification, Commands and Utilities, Issue 4, 1992.


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003