nohup
”makes commands immune to hangups and quits
/usr/bin/nohup command [ arguments ]
There are three distinct versions of
nohup
.
nohup
is built into the C shell and is an executable program available in
/usr/bin/nohup
when using the Bourne shell. The Bourne shell version of
nohup
executes commands such that they are immune to
HUP
(hangup) and
TERM
(terminate) signals. If the standard output is a terminal, it is redirected to the file
nohup.out
. The standard error is redirected to follow the standard output. The priority is incremented by five.
nohup
should be invoked from the shell with
&
in order to prevent it from responding to interrupts or input from the
next
user
.
Example A.39.
nohup lookup &
EXPLANATION
The
lookup
program will run in the background and continue to run until it has completed, even if the user logs off. Any output generated goes to a file in the current directory called
nohup.out
.
|