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

File descriptor leak

2020-07-30 Thread Chris Dunlop
From: ch...@onthe.net.au To: bug-bash@gnu.org Subject: File descriptor leak Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-2bxm7h/bash-5.0=. -fstack-protector-strong

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...@]}

File descriptor leak in nested functions

2010-04-16 Thread Charles Duffy
c-linux-gnu Bash Version: 4.0 Patch Level: 33 Release Status: release Description: File descriptor leak in nested functions Repeat-By: Run the following code: function get_fd_count() { local fds cd /proc/$$/fd; fds=( * ) # avo

Re: File descriptor leak in nested functions

2010-04-16 Thread Charles Duffy
2 > -Wall > uname output: Linux cduffyxp 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 > 04:38:19 UTC 2010 x86_64 GNU/Linux > Machine Type: x86_64-pc-linux-gnu > > Bash Version: 4.0 > Patch Level: 33 > Release Status: release > > Description: > File descriptor leak in