1

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?

3 Answers3

3

You should just be able to do a

. .bashrc and have it take effect immediately.

1

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

chaos
  • 7,463
  • 4
  • 33
  • 49
0

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.

  • 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 02 '09 at 19:39