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?

migrated from serverfault.com Apr 18 '16 at 15:12

This question came from our site for system and network administrators.

  • It depends on what your command does (in a couple of quick checks, neither case stops). By knowing more about the command, someone might point out a reason. – Thomas Dickey Apr 18 '16 at 22:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.