Skip to content
Advertisement

Running a script remotely on a Linux machine with screen and nohup is killed shortly after logout [closed]

I often run a code on a remote Linux/Ubuntu desktop with the use of screen. So I log in through SSH, start a screen, start the job, detach the screen and everything works fine. However, recently the job is being killed shortly after I logoff the SSH connection. I also tried using nohup but this shows the same problem. Any idea how to solve this?

Advertisement

Answer

It has nearly surely nothing to do with your screen. The programs running in screen doesn’t get the signal if your virtual terminal died, if it was a logout or a network downtime, it doesn’t matter.

On my experience, nohup is very simple and not really comfortable tool compared to screen, and it can’t anything which screen couldn’t. They don’t extend themselfes.

On my opinion, the problem is nearly surely in your program. Maybe if it doesn’t produce too many strace output, it would be feasible if you would let it run in a screen, while you are stracing it from another. (If you don’t know it, google for “strace”, you will use it very, very many times from now.)

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement