bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash 3.2.39 -- race condition


From: Pierre Gaston
Subject: Re: bash 3.2.39 -- race condition
Date: Fri, 27 Nov 2009 09:53:44 +0200

On Thu, Nov 26, 2009 at 2:35 AM, Douglas Moyes <douglas@hq.newdream.net> wrote:
> I nearly brought down a server today.
>
> # alias d="perl-script "
> ....
>
> # d() {
> # perl-script $1 |grep something|cut -d ' ' -f 3
> # }
> # d something
> ..... ..... .... CRASH
>
> turns out bash went into a loop calling d over and over again, which
> resulted in thousands of grep, bash, and -d processes being executed. It
> wasn't pretty.

it rather went to calling "perl-script" over and over, d was expanded
when you defined
the function so you ended up with a recursive "perl-script" function.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]