Nohup: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=External= * nohup on wikipedia http://en.wikipedia.org/wiki/Nohup =Internal= * Linux !!!Overview nohup is a POSIX command to ignore the HUP (hangup)...")
 
No edit summary
Line 7: Line 7:
* [[Linux#Commands|Linux]]
* [[Linux#Commands|Linux]]


=Overview=


!!!Overview
<tt>nohup</tt> is a POSIX command to ignore the HUP (hangup) signal. The HUP signal is, by convention, the way a terminal warns dependent processes of logout.


nohup is a POSIX command to ignore the HUP (hangup) signal. The HUP signal is, by convention, the way a terminal warns dependent processes of logout.
<pre>
 
{{{
nohup command &
nohup command &
}}}
</pre>


Output that would normally go to the terminal goes to a file called ./nohup.out if it has not already been redirected.
Output that would normally go to the terminal goes to a file called ./nohup.out if it has not already been redirected.

Revision as of 18:52, 14 October 2016

External

Internal

Overview

nohup is a POSIX command to ignore the HUP (hangup) signal. The HUP signal is, by convention, the way a terminal warns dependent processes of logout.

nohup command &

Output that would normally go to the terminal goes to a file called ./nohup.out if it has not already been redirected.

Note that nohupping backgrounded jobs is typically used to avoid terminating them when logging off from a remote SSH session.

A different issue that often arises in this situation is that ssh is refusing to log off ("hangs"), since it refuses to lose any data from/to the background job(s).

This problem can be overcome by redirecting all three I/O streams:

{{{ $ nohup ./myprogram > foo.out 2> foo.err < /dev/null & }}}


!!!Solution Used to Background gld Remotely

status to interact with it"

   sleep 1

else ... fi


__Referenced by:__\\ [{INSERT com.ecyrd.jspwiki.plugin.ReferringPagesPlugin WHERE max=20, maxwidth=50}]