Say if I run some command in background:
./my_script.sh > /dev/null &
and I close putty immediately (which is equivalent to disconnect current session right?).
Will the background process finish? Please advise, thanks.
When you exit an interactive bash login shell, it sends a SIGHUP to all children unless the shell option
When most userland processes receive a SIGHUP, they will exit.
You can also prefix the command with
If you want backgrounded tasks to persist, look into using screen
To create or reconnect to a screen session called 'myprocess' which will persist across sessions:
To list all screens: