bug-bash
[Top][All Lists]
Advanced

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

Re: funcnest and recursion


From: Chet Ramey
Subject: Re: funcnest and recursion
Date: Fri, 23 May 2014 10:48:11 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 5/23/14, 10:17 AM, Ondrej Oprala wrote:
> Hi, there've recently been a few bug reports against bash on RH BZ,
> saying that bash can't handle infinite recursion the way zsh or ksh can.
> 
> Looking at execute_cmd.c, there are the  funcnest{,_max} variables
> and a piece of code using them in execute_function().
> 
> Will funcnest_max be set to non-0 in upstream code in the future?
> Or is it just there for the downstream maintainers to set it if they
> see it fit?

Neither.  The funcnest_max variable reflects the value of the FUNCNEST
shell variable.  Users can set the maximum recursion level they want,
without changing the bash code at all, but the default is still as much as
the stack will give you (as it has been all along).

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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