After running a process, then using:
ctrl+z
bg
disown [-h]
Closing the connection still results in interrupting the running process.
After running a process, then using:
ctrl+z
bg
disown [-h]
Closing the connection still results in interrupting the running process.
disownwould prevent that from happening? – Sep 14 '21 at 22:39SIGHUPsignal b) it tries to write to the terminal which no longer exists, gets an error, and exits with an error message which goes nowhere c) systemd kills it (this was debated at long) or d) something else.nohupwill only help with a). I suggest you attach to it from another terminal/ssh connection withstrace -fp PID, and see what's actually happening. – Sep 14 '21 at 23:55foo &, orfoofollowed by Ctrl-Z andbg, you havefooas a job with a single process, and that's the jobdisownwithout arguments will remove from the bash's jobs table, without detaching it from the terminal or downgrading it from a job to a simple process or other nonsensical magical actions. – Sep 15 '21 at 00:01