 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. output that would normally go to the terminal goes to a file called nohup.out if it has not already been redirected. == use == the first of the commands below starts the program abcd in the background in such a way that the subsequent logout does not stop it. $ nohup abcd & $ exit note that these methods prevent the process from being sent a 'stop' signal on logout, but if input/output is being received for these standard i/o files (stdin, stdout, or stderr), they will still hang the terminal. see overcoming hanging, below. nohup is often used in combination with the nice command to run processes on a lower priority. $ nohup nice abcd & ==existing jobs, processes== some shells (e.g. bash) provide a shell builtin that may be used to prevent sighup being sent or propagated to existing jobs, even if they were not started with nohup. in bash, this can be obtained by using disown -h job; using the same builtin without arguments removes the job from the job table, which also implies that the job will not receive the signal. before using disown on an active job, it should be stopped by ctrl-z, and continued in the background by the bg command.https://www.gnu.org/software/bash/manual/bashref.html#job-control-builtins another relevant bash option is shopt huponexit, which automatically sends the hup signal to jobs when the shell is exiting normally.https://www.gnu.org/software/bash/manual/bashref.html#the-shopt-builtin the aix and solaris versions of nohup have a -p option that modifies a running process to ignore future sighup signals. unlike the above-described disown builtin of bash, nohup -p accepts process ids.https://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.cmds4/nohup.htmhttp://download.oracle.com/docs/cd/e19963-01/821-1461/6nmeo035h/index.html ==overcoming hanging== 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 also be overcome by redirecting all t
Unix_SUS2008_utilities