<s>
nohup	B-Device
is	O
a	O
POSIX	O
command	B-Application
which	O
means	O
"	O
no	O
hang	O
up	O
"	O
.	O
</s>
<s>
Its	O
purpose	O
is	O
to	O
execute	O
a	O
command	B-Application
such	O
that	O
it	O
ignores	O
the	O
HUP	B-General_Concept
(	O
hangup	O
)	O
signal	O
and	O
therefore	O
does	O
not	O
stop	O
when	O
the	O
user	O
logs	O
out	O
.	O
</s>
<s>
nohup	B-Device
is	O
often	O
used	O
in	O
combination	O
with	O
the	O
nice	B-Device
command	B-Application
to	O
run	O
processes	O
on	O
a	O
lower	O
priority	O
.	O
</s>
<s>
bash	B-Operating_System
)	O
provide	O
a	O
shell	O
builtin	O
that	O
may	O
be	O
used	O
to	O
prevent	O
SIGHUP	B-General_Concept
being	O
sent	O
or	O
propagated	O
to	O
existing	O
jobs	O
,	O
even	O
if	O
they	O
were	O
not	O
started	O
with	O
nohup	B-Device
.	O
</s>
<s>
In	O
bash	B-Operating_System
,	O
this	O
can	O
be	O
obtained	O
by	O
using	O
disown	B-Application
-h	O
job	O
;	O
using	O
the	O
same	O
builtin	O
without	O
arguments	O
removes	O
the	O
job	O
from	O
the	O
job	O
table	O
,	O
which	O
also	O
implies	O
that	O
the	O
job	O
will	O
not	O
receive	O
the	O
signal	O
.	O
</s>
<s>
Before	O
using	O
disown	B-Application
on	O
an	O
active	O
job	O
,	O
it	O
should	O
be	O
stopped	O
by	O
Ctrl-Z	O
,	O
and	O
continued	O
in	O
the	O
background	O
by	O
the	O
bg	O
command	B-Application
.	O
</s>
<s>
Another	O
relevant	O
bash	B-Operating_System
option	O
is	O
shopt	O
huponexit	O
,	O
which	O
automatically	O
sends	O
the	O
HUP	B-General_Concept
signal	O
to	O
jobs	O
when	O
the	O
shell	O
is	O
exiting	O
normally	O
.	O
</s>
<s>
The	O
AIX	B-Application
and	O
Solaris	B-Application
versions	O
of	O
nohup	B-Device
have	O
a	O
-p	O
option	O
that	O
modifies	O
a	O
running	O
process	O
to	O
ignore	O
future	O
SIGHUP	B-General_Concept
signals	O
.	O
</s>
<s>
Unlike	O
the	O
above-described	O
disown	B-Application
builtin	O
of	O
bash	B-Operating_System
,	O
nohup	B-Device
-p	O
accepts	O
process	O
IDs	O
.	O
</s>
<s>
The	O
command	B-Application
has	O
also	O
been	O
ported	O
to	O
the	O
IBM	B-Application
i	I-Application
operating	O
system	O
.	O
</s>
<s>
Note	O
that	O
nohupping	O
backgrounded	O
jobs	O
is	O
typically	O
used	O
to	O
avoid	O
terminating	O
them	O
when	O
logging	O
off	O
from	O
a	O
remote	O
SSH	B-Protocol
session	B-Operating_System
.	O
</s>
<s>
A	O
different	O
issue	O
that	O
often	O
arises	O
in	O
this	O
situation	O
is	O
that	O
ssh	B-Protocol
is	O
refusing	O
to	O
log	O
off	O
(	O
"	O
hangs	O
"	O
)	O
,	O
since	O
it	O
refuses	O
to	O
lose	O
any	O
data	O
from/to	O
the	O
background	O
job(s )	O
.	O
</s>
<s>
This	O
problem	O
can	O
also	O
be	O
overcome	O
by	O
redirecting	B-Device
all	O
three	O
I/O	O
streams	O
:	O
</s>
<s>
Also	O
note	O
that	O
a	O
closing	O
SSH	B-Protocol
session	B-Operating_System
does	O
not	O
always	O
send	O
a	O
HUP	B-General_Concept
signal	O
to	O
dependent	O
processes	O
,	O
such	O
as	O
when	O
a	O
pseudo-terminal	B-Protocol
has	O
not	O
been	O
allocated	O
.	O
</s>
<s>
A	O
terminal	O
multiplexer	O
can	O
run	O
a	O
command	B-Application
in	O
a	O
separate	O
session	B-Operating_System
,	O
detached	O
from	O
the	O
current	O
terminal	O
,	O
which	O
means	O
that	O
if	O
the	O
current	O
session	B-Operating_System
ends	O
,	O
the	O
detached	O
session	B-Operating_System
and	O
its	O
associated	O
processes	O
keeps	O
running	O
.	O
</s>
<s>
One	O
can	O
then	O
reattach	O
to	O
the	O
session	B-Operating_System
later	O
on	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
following	O
invocation	O
of	O
screen	B-Application
will	O
run	O
somescript.sh	O
in	O
the	O
background	O
of	O
a	O
detached	O
session	B-Operating_System
:	O
</s>
<s>
The	O
disown	B-Application
command	B-Application
is	O
used	O
to	O
remove	O
jobs	O
from	O
the	O
job	O
table	O
,	O
or	O
to	O
mark	O
jobs	O
so	O
that	O
a	O
SIGHUP	B-General_Concept
signal	O
is	O
not	O
sent	O
on	O
session	B-Operating_System
termination	O
.	O
</s>
