Process java still being killed

nohup

I need to run a java program on my university servers. I'm remotely logging in through their servers via ssh

So I used nohup like so:

nohup java -jar project.jar &

However when I logout and close the terminal then log back into the server my process is missing/got killed off.

Best Answer

nohup only make program immune to SIGHUP and SIGQUIT signal. Modern shell maybe send other signals when you logout from your session, so there is no guarantee that your program is not killed, even running under nohup.

The better solution is using tmux or screen, or if you use bash, you can try:

$ java -jar project.jar &
$ disown
Related Question