Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have 64-bit RHEL 2.6.18-238.el5 running. I access the machine through vpn. I started an application via terminal and while application was running there was disconnection in vpn which closed my terminal. Upon reconnecting to vpn when I opened the terminal I could see that my application is still running ,checked using ps -ef command. Now how can I continue using my application in the terminal. Is there any way to access that running application in the terminal? Please help.Thanks

share|improve this question
add comment

3 Answers 3

up vote 3 down vote accepted

You should make a habit of starting screen as soon as you login in a remote box.

You might want to give retty a try, but keep in mind that your chances to regain control of your application are minimal.

share|improve this answer
add comment

You can use screen tool for situations like this.

First install the screen tool. Then type screen and run the application. If the VPN is disconnected, Log in to the server again and type server -ls.

It will list available screen sessions. To connect to a screen session type screen -r <session_name>. From there you can continue from the last disconnected position.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.