nohup renders a process immune to the shell's SIGHUP, but even if I run this from my shell:
bash -c 'while true; do sleep 1; date; done' >& nohup.out &
then log out and log back in, bash is still running and producing output to nohup.out. Is there any difference? Is relying solely on redirection less reliable in any way?
Best Answer
In bash backgrounded jobs do not need to be protected by nohup
Depending on your version of bash, the behaviour can be changed. In the SIGNALS section of the manual page
The huponexit option defaults to off