View Full Version : How do I recover a lost shell session because of modem connection dropping
mrbinky3000
2004-05-18, 10:49 PM CDT
Hello,
This may seem like a newbie question. I was logged into my colocated server from home via a dialup connection when the connection was dropped. I was in the middle of running rpmbuild to compile something.
Is there any way to reconnect and get back on the same shell session that I was on before my modem dropped the connection?
- Matt
Jman
2004-05-19, 05:01 PM CDT
I doubt you can. Processes you start by default only run for the current session. Perhaps you have some processes that survived. Try running top or some process utility and filter for your name.
Next time try making your commands not hang up by running nohup command
ilja
2004-05-20, 01:10 AM CDT
I oncehave read that if you start a process in the background ( with & on the end of the command) it will run even if you log-off the shell. Try it start something like updatedb & and log off. And then come back and see whether it runs or no.
crackers
2004-05-20, 09:53 PM CDT
Incorrect. When a shell session ends, it takes all of it's child processes (including background processes) with it. If you want to start something in the background and leave it running, you need to use nohup to disconnect it from the shell session.
Regarding recovering a remote shell session: it's gone. Depending upon the remote protocol (telnet, ssh, rsh) and the OS, the session may still be "running," but the programs running in it are attached to it, not the new one.
bradthemad
2004-05-20, 10:24 PM CDT
See also: GNU screen (http://www.linux.com/article.pl?sid=04/04/06/1513220)
ilja
2004-05-21, 06:19 AM CDT
thx for the information crackers :)
nphadnis
2004-11-16, 08:51 AM CST
The screen command can be used to start a recoverable shell session. The screen -r command can be used to recover a lost session. The screen -list command can be used to view sessions that can be recovered
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.