For those who might be interested, here's a much simpler function that
exhibits the same kind of leak and doesn't involve nested functions.
fd_leaker() { while :; do read a < <(pwd); c=(/proc/$$/fd/*);
c=${...@]}; echo $c; done; }
For some reason, adding "(exit 0); " right before the "done" seems to
limit the creation of extra file descriptors.
The problem seems to be related to read and subshells.
On Sat, Apr 17, 2010 at 10:17 PM, Chet Ramey <[email protected]> wrote:
>
> Thanks for the report. This will be fixed in the next release of bash.
>
> Chet
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/
>
>