Re: Trap variable scope

2012-12-15 Thread Chet Ramey
On 11/2/12 10:48 AM, Nikolai Kondrashov wrote: > Hi everyone, > > I've encountered a very strange behavior regarding variable scope and traps, > which looks very much like a bug. This will be fixed, to the extent that identical blocks of code like the two below will do the same thing, in the next

Trap variable scope

2012-11-02 Thread Nikolai Kondrashov
Hi everyone, I've encountered a very strange behavior regarding variable scope and traps, which looks very much like a bug. This command: echo ' set -e; tt() { declare -r v=; };t() { tt; }; ff() { declare -r v=; false; }; f() { ff; }; trap t EXIT; f ' | bash produce