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.
disown
would prevent that from happening? – Sep 14 '21 at 22:39SIGHUP
signal 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.nohup
will 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 &
, orfoo
followed by Ctrl-Z andbg
, you havefoo
as a job with a single process, and that's the jobdisown
without 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