LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Lost all my running programs on a server (inside *screen) when my client restarted (https://www.linuxquestions.org/questions/linux-newbie-8/lost-all-my-running-programs-on-a-server-inside-%2Ascreen-when-my-client-restarted-876349/)

siasia 04-21-2011 09:59 AM

Lost all my running programs on a server (inside *screen) when my client restarted
 
I sshed to a server a week ago, then ran *screen* and created a few windows in my screen session. I then ran a few programs on those screens. All the programs were running in the background (I run them with &). I did not close or detach from the screen sessions. So I was still connected to those screen sessions from my client machine.

Then, this morning I find my client machine rebooted. When I do screen -ls I find there are no screens available to reattach to. But that is not the worst part. The strange thing is that all my processes (which were running on the server) have disappeared as well, even though they were running in the background.

I thought 1) using screen I will be able to re-attach to old screens when my client restarts, 2) If I have sshed to a server and have run programs in the background, restarting the client should not stop those programs (even if I had not used screen).

Am I missing something basic here?

never say never 04-21-2011 11:58 AM

First to your point 2. Any processes running in the background are still tied to your login, if you logout the processes are terminated. If you don't want the process to terminate on logout try:
Code:

nohup <command> &
Point 1 should be correct. Why you lost your screen session, I don't know. I use screen all the time without issue (admittedly I generally detach and log off when I am not using it) Is it possible a BOFH killed your screen session?

siasia 04-21-2011 01:39 PM

Quote:

Code:

nohup <command> &
Point 1 should be correct. Why you lost your screen session, I don't know. I use screen all the time without issue (admittedly I generally detach and log off when I am not using it) Is it possible a BOFH killed your screen session?
Thanks for the response. I just realized that to my surprise our server had got rebooted as well. That explains everything.


All times are GMT -5. The time now is 12:55 PM.