Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Can I nohup/screen an already-started process?

GNU screen is great for long running programmes. You can start your programme in it and disconnect and bring your laptop home.

However sometimes I start a programme outside screen and it takes longer than I want. I have no problem with pausing the programme using Control - Z etc., however I don't want to restart it cause then it'll take ages to run again. Is there some way I can move an existing running process into a screen session?

share|improve this question

marked as duplicate by splattne Aug 4 '09 at 19:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Dupe:… – Murali Suriar Aug 4 '09 at 16:50
Yes you can. Reptyr was made just for that purpose: – newUserNameHere Sep 27 '14 at 18:31
up vote 1 down vote accepted

No, sorry, you can't.

Furthermore I do the same as David Mackintosh. Where ever I am, I start my screen (although I use screen -x). Almost everything I do on my server is running inside my screen, with about 20 screen windows open.

In that case, it will not mind if something is taking a bit longer.

share|improve this answer
yes you can do it, use reptyr, see: – rubo77 May 14 '13 at 17:26

I think the answer is "no".

After having some horrible experiences with poor wireless connectivity and long-running processes, I reflexively run EVERYTHING in screen sessions now. My first command on connecting to a system is nearly always

$ screen -ADR

...and I go from there.

share|improve this answer
mosh is a nice alternative also – Arnold Roa Jan 15 at 20:23

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