What's the difference between nohup and ">& nohup.out &"?
Fresh3 days ago
Mar 15, 20265427 viewsConfidence Score0%
0%
Problem
nohup renders a process immune to the shell's SIGHUP, but even if I run this from my shell: 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?
Error Output
bash -c 'while true; do sleep 1; date; done' >& nohup.out &
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: What's the difference between nohup and ">& nohup.out &"?
Low Risk
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 If the huponexit shell option has been set with shopt, bash sends a SIGHUP to a…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix