Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am updating my ports in MacPorts which may take a day. I have changed my dot -files. I would like to test them without shutting the updates down.

I have ^Z the installation and restarted my shell. However, I am using Screen such that my settings will not be reset until I detach the whole Screen. This would however stop the installation which I do not want.

I know that there is a command which allows me to put the installation to "background". However, I am not sure

  • which is the name of this command (it seems not to be bg)

How can you put the installation to background?

share|improve this question
    
This is a similar question: stackoverflow.com/questions/796079/… –  Masi Jul 2 '09 at 19:19

3 Answers 3

up vote 1 down vote accepted

Probably you want bg and then disown. This is much as if you'd run the install under nohup beforehand.

share|improve this answer
    
I have no manual for bg and disown. I use OS/X. –  Masi Jul 2 '09 at 19:11
    
I use Zsh. --- This is a great answer about disown: stackoverflow.com/questions/603696/… –  Masi Jul 2 '09 at 19:22
    
The new question is at here: serverfault.com/questions/35246/… –  Masi Jul 2 '09 at 19:28
1  
@masi: 'jobs' command. –  chaos Jul 2 '09 at 19:29
    
@chaos: jobs shows me a list of current processes in stack. --- Please, see the bottom of the message: serverfault.com/questions/35232/… –  Masi Jul 2 '09 at 19:33

You should just be able to do a

. .bashrc and have it take effect immediately.

share|improve this answer
    
I run everything on Screen. --- This may be the reason your command does notwork. –  Masi Jul 2 '09 at 19:17
    
You need to be in the same directory as your .bashrc file for this command to work. –  k3ri Jul 2 '09 at 19:43
    
Which version of OSX are you running, anyways? –  k3ri Jul 2 '09 at 19:46

It seems that my process is now at background.

I did

...
zsh: suspended  sudo port upgrade outdated
$bg                                                                            ~ 1
[1]  + continued  sudo port upgrade outdated
$disown                                                                        ~ 1
$jobs                                                                          ~ 
$                                                                              ~

[edit]

My command does not work.

Please see what I get after jobs command

...
$disown                                                                                                                                                 ~ 1
$jobs                                                                                                                                                    ~ 
$--->  Building python25                                                                                                                                 ~ 
--->  Staging python25 into destroot
--->  Deactivating python25 @2.5.4_2+darwin_9+macosx    bg5latex      bg5pdflatex 
--->  Installing python25 @2.5.4_6+darwin_9+macosx
--->  Activating python25 @2.5.4_6+darwin_9+macosx

To fully complete your installation and make python 2.5 the default, please run

        sudo port install python_select  
        sudo python_select python25

--->  Cleaning python25
--->  Fetching iso-codes
--->  Attempting to fetch iso-codes-3.10.1.tar.bz2 from http://arn.se.distfiles.macports.org/iso-codes
--->  Verifying checksum(s) for iso-codes
--->  Extracting iso-codes
--->  Configuring iso-codes
--->  Building iso-codes

It seems to put stuff to my shell from background. This is strange since I can clear and then run my own commands.

It does not put nothing at the moment to my screen. It apparently needs some time to make it again.

share|improve this answer
1  
Your backgrounded process still has your terminal as its stdout/stderr. You can redirect those using > and 2> when first running the process (or if you use nohup it'll do it for you by default). I don't know of any way to change a process's stdout/stderr from outside it after it's started, but that doesn't mean there isn't one. –  chaos Jul 2 '09 at 19:39

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.