Re: bash: fork: Resource temporarily unavailable
On Sun, Sep 08, 2002 at 12:19:21PM -0700, Alex Withers wrote:
> On Sun, 8 Sep 2002, Nicos Gollan wrote:
> > We had this on the list some days ago. Run ps ax and see if you've got a
> > huge quantity of (defunct) processes.
>
> As it turns out that was it, in a way. I had a line in my .bashrc that
> went like so: PAGER=`which less`. For some reason this would cause a
> momentary explosion in the number of "which" processes.
'which' is a shell script, so it read your .bashrc again, which called
'which', and so on ...
This should get round that problem by only setting $PAGER for
interactive shells. (It looks less verbose when you have several
environment variables to set in the same way.)
case $- in
*i*)
export PAGER=`which less`
;;
esac
--
Colin Watson [cjwatson@flatline.org.uk]
Reply to: