2

I have a Java application on a suseEnvironment which I start with a SH file.

I use the command: startFile.sh &.

If I logged in via putty, the application is still running after I've closed putty.

If I'm logged in at suse directly (via UI) and I start the application, It will be terminated after I've logged out from SUSE.

What is the difference?

  • Do you log out of the remote system before closing putty, or do you close putty without logging out? – Mark Plotnick Nov 6 '14 at 15:08
0

Giving & only puts it in the background. You also have to do nohup:

nohup startFile.sh &

so that the program doesn't receive SIGHUP.

  • Yes I Know, but why is the Application still alive if I start it without nohup via putty after closing putty? – Juergen Nov 6 '14 at 13:57
  • Because PuTTY probably doesn't simulate a SIGHUP when it exits. – John WH Smith Nov 6 '14 at 15:20
  • @Juergen Sorry I misread the emphasis in your question. I haven't used Putty for a while, but closing a window, doesn't necessarily mean the underlying connection is broken. If you use password login, does Putty ask you for a password on reconnect? – Anthon Nov 6 '14 at 15:28
  • @Anthon Yes Putty asks for the PW. – Juergen Nov 6 '14 at 17:06
  • @Juergen Do you have disown -h in your ~/.bash_logout (or /bash/bash.bash_logout? – Anthon Nov 6 '14 at 17:17

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.