How do I make install clean a port in the background

Bill Moran wmoran at potentialtech.com
Thu Aug 9 13:31:03 PDT 2007


In response to Reid Linnemann <lreid at cs.okstate.edu>:

> Written by Sean Murphy on 08/09/07 15:15>>
> > How do I make install clean a port in the background?  I used
> > 
> > cd /usr/ports/www/apache22
> > make install clean &
> > 
> > it returns the pid but then compiles in the foreground
> > 
> > What am I doing wrong?
> > 
> > _______________________________________________
> > freebsd-questions at freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to 
> > "freebsd-questions-unsubscribe at freebsd.org"
> 
> You're just seeing the output in the foreground, since the stdio and 
> stderr for that process are still directed to the terminal. If you are 
> using bash, you could "make install clean &> /dev/null &" to have the 
> process operate in the background and direct all output the the 
> bitbucket. I don't know the analog for other shells.

That's only going to help so much.  Most ports are going to generate compiler
warnings that go to stderr, which will still spam your screen.

First off, I recommend directing to a file instead of /dev/null.  That way
if it fails, you have the output to review.  Secondly, redirect both
standard out and standard error.  In bourne shells:

make install clean >~/buildlog.txt 2>&1 &

-- 
Bill Moran
http://www.potentialtech.com


More information about the freebsd-questions mailing list