On 4/18/10 1:33 AM, Dennis Williamson wrote: > 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.
Not quite. The problem has to do with process substitution and builtins. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/