Re: File descriptor leak

2020-07-31 Thread Chet Ramey
On 7/31/20 12:29 AM, Chris Dunlop wrote: > Bash Version: 5.0 > Patch Level: 3 > Release Status: release > > Description: > Bash is leaking a file descriptor. Patches 16 and 17 deal with this. Patch 17 is the ultimate fix. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

Re: File descriptor leak in nested functions

2010-04-18 Thread Chet Ramey
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 som

Re: File descriptor leak in nested functions

2010-04-17 Thread Dennis Williamson
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

Re: File descriptor leak in nested functions

2010-04-17 Thread Chet Ramey
On 4/15/10 6:58 PM, Charles Duffy wrote: > The provided reproducer was unnecessarily complicated. The following also > reproduces the issue: > > function get_fd_count() { > local fds > cd /proc/$$/fd; fds=( * ) # avoid a StackOverflow source colorizer bug > echo "${#f...@]}

Re: File descriptor leak in nested functions

2010-04-16 Thread Charles Duffy
The provided reproducer was unnecessarily complicated. The following also reproduces the issue: function get_fd_count() { local fds cd /proc/$$/fd; fds=( * ) # avoid a StackOverflow source colorizer bug echo "${#f...@]}" } function fd_leak_func() { while : ; do