Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(1)

nice(1)

sh(1)

signal(5)

nohup(1)

NAME

nohup − run a command immune to hangups, logouts, and quits

SYNOPSIS

nohup command [ arguments ]

DESCRIPTION

nohup executes command with hangups and quits ignored.  If output is not redirected by the user, both standard output and standard error are sent to nohup.out.  If nohup.out is not writable in the current directory, output is redirected to $HOME/nohup.out; otherwise, nohup fails. 

If output from nohup is redirected to a terminal, or is not redirected at all, the output is sent to nohup.out. 

EXTERNAL INFLUENCES

International Code Set Support

Single- and multi-byte character code sets are supported. 

EXAMPLES

It is frequently desirable to apply nohup to pipelines or lists of commands.  This can be done only by placing pipelines and command lists in a single file, called a shell script.  To run the script using nohup:

nohup sh file

nohup features apply to the entire contents of file. If the shell script file is to be executed often, the need to type sh can be eliminated by setting execute permission on file. The script can also be run in the background with interrupts ignored (see sh(1)):

nohup file &

file typically contains normal keyboard command sequences that one would want to continue running in case the terminal disconnects, such as:

tbl ofile | eqn | nroff > nfile

WARNINGS

Be careful to place punctuation properly.  For example, in the command form:

nohup command1; command2

nohup applies only to command1. To correct the problem, use the command form:

nohup (command1; command2)

Be careful of where standard error is redirected.  The following command may put error messages on tape, making it unreadable:

nohup cpio -o <list >/dev/rmt/1m&

whereas

nohup cpio -o <list >/dev/rmt/1m 2>errors&

puts the error messages into file errors. 

SEE ALSO

chmod(1), nice(1), sh(1), signal(5). 

STANDARDS CONFORMANCE

nohup: SVID2, XPG2, XPG3, POSIX.2

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026