View previous topic :: View next topic |
Author |
Message |
fRIOUX n00b
Joined: 13 Jul 2005 Posts: 21
|
Posted: Thu Aug 17, 2006 5:38 am Post subject: How do I resume a suspended process in a *different* shell? |
|
|
Often I have the problem of starting a large emerge and get halfway through and want to log out of X, or I have run the emerge in the console and I want to see the status in X. But I can't because I didn't think ahead and start the thing in a screen session. Is there a way that I can suspend (Ctrl-Z) and then resume (fg %1) from a screen session? I have wanted to know how to do something like this for a long time, so if someone know's fill me in on the secret! |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Thu Aug 17, 2006 6:11 am Post subject: |
|
|
not that I know, but you can still stop it with 'CTRL+C' then when you're ready again, run 'emerge --resume'
just be aware, that you should avoid stopping emerge process when it's copying/deleting files to the filsystem |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Thu Aug 17, 2006 7:39 am Post subject: |
|
|
fRIOUX: But just to be sure not to break anything, you should do the same I did in the past: I changed by personal habits. Nowadays ALWAYS when I touch emerge -- even if just emerge --sync, I start it in screen session. Just in case. _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
beatryder Veteran
Joined: 08 Apr 2005 Posts: 1138
|
Posted: Thu Aug 17, 2006 8:05 am Post subject: |
|
|
emerge screen
then learn how to use it _________________ Dont make it idiot proof, make it work.
Neucode.org
<suppressed key> |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Thu Aug 17, 2006 9:35 am Post subject: |
|
|
you obviously did not read his post...
Last edited by truc on Thu Aug 17, 2006 2:09 pm; edited 1 time in total |
|
Back to top |
|
|
nevynxxx Veteran
Joined: 12 Nov 2003 Posts: 1123 Location: Manchester - UK
|
Posted: Thu Aug 17, 2006 1:34 pm Post subject: |
|
|
1) Create a script that starts a screen session, then runs the emerge within it, then alias that script to emerge....
2) set your shell to the screen executable...
3) set your bash.rc to start screen last....
Any of those sound reasonable? _________________ My Public Key
Wanted: Instructor in the art of Bowyery |
|
Back to top |
|
|
beatryder Veteran
Joined: 08 Apr 2005 Posts: 1138
|
Posted: Thu Aug 17, 2006 2:19 pm Post subject: |
|
|
truc wrote: | you obviously did not read his post... |
Correct, my bad _________________ Dont make it idiot proof, make it work.
Neucode.org
<suppressed key> |
|
Back to top |
|
|
fRIOUX n00b
Joined: 13 Jul 2005 Posts: 21
|
Posted: Thu Aug 17, 2006 6:37 pm Post subject: |
|
|
nevynxxx wrote: | 1) Create a script that starts a screen session, then runs the emerge within it, then alias that script to emerge....
2) set your shell to the screen executable...
3) set your bash.rc to start screen last....
Any of those sound reasonable? |
Yeah, that's what I generally do really. I have been using one computer all summer and when a term opens it automatically runs 'screen -x main' on start, but I was just working on a different computer and I hadn't started in a screen session. Thanks for the help anyway. I was just really wondering if there was a UNIXy, configless way to fix this issue if I didn't do things right in the beginning. |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Thu Aug 17, 2006 6:38 pm Post subject: |
|
|
fRIOUX wrote: | I was just really wondering if there was a UNIXy, configless way to fix this issue if I didn't do things right in the beginning. |
I wonder if retty could help you in those cases. _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
wizkid n00b
Joined: 23 Sep 2004 Posts: 54
|
Posted: Thu Aug 17, 2006 10:26 pm Post subject: |
|
|
I always just use screen. It's easier, and if it's a big emerge, I can ssh in and monitor it from work, capture a log file, etc. It's your best option.
Screen will spoil ya. _________________ Linux Rules --- NT (And XP) Drools |
|
Back to top |
|
|
hegga Apprentice
Joined: 04 Jun 2003 Posts: 210 Location: Norway
|
Posted: Fri Oct 05, 2007 1:28 pm Post subject: move job inside screen |
|
|
I've started a job outside screen, but have found out that it's going to take a while to finish
and want to move inside a screen shell.
Does anyone know how I can achieve that? _________________ hegga |
|
Back to top |
|
|
desultory Bodhisattva
Joined: 04 Nov 2005 Posts: 9410
|
Posted: Sat Oct 06, 2007 7:21 am Post subject: |
|
|
Merged the above post. |
|
Back to top |
|
|
Sadako Advocate
Joined: 05 Aug 2004 Posts: 3792 Location: sleeping in the bathtub
|
Posted: Sun Oct 07, 2007 2:01 am Post subject: |
|
|
Do you have to have to move it to screen?
If you just didn't want to leave the xterm open, you could probably suspend the emerge process, background it and then disown it. _________________ "You have to invite me in" |
|
Back to top |
|
|
|