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?

1
  • Do you log out of the remote system before closing putty, or do you close putty without logging out? Commented Nov 6, 2014 at 15:08

1 Answer 1

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.

5
  • Yes I Know, but why is the Application still alive if I start it without nohup via putty after closing putty?
    – Juergen
    Commented Nov 6, 2014 at 13:57
  • Because PuTTY probably doesn't simulate a SIGHUP when it exits. Commented Nov 6, 2014 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
    Commented Nov 6, 2014 at 15:28
  • @Anthon Yes Putty asks for the PW.
    – Juergen
    Commented Nov 6, 2014 at 17:06
  • @Juergen Do you have disown -h in your ~/.bash_logout (or /bash/bash.bash_logout?
    – Anthon
    Commented Nov 6, 2014 at 17:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .