Referring to this question, I am trying to use
nohup <command> <arg> & to continue to run a command in the background after I logout from the SSH shell terminal. However, the background process terminates immediately when I logout from the shell terminal, even though I have used
nohup ... &.
After further testing, I found that the background process will only terminate when I logout by clicking the
X button in the PuTTY window. If I logout from the PuTTY window by typing
exit in the SSH shell terminal, the background process will continue to run in the background.
Why the background process behaves differently when I logout using these 2 methods?
What is the difference between the SIGHUP generated by typing
exit in the SSH shell terminal vs clicking the
X button in the PuTTY window?