Re: **/ directory wildcards leak file descriptors and memory

2012-06-23 Thread Serge van den Boom
On Sat, 23 Jun 2012, Chet Ramey wrote: > On 6/20/12 2:50 PM, Serge van den Boom wrote: > > Bash Version: 4.2 > > Patch Level: 29 > > Release Status: release > > > > Description: > > If you interrupt the evaluation of **/ wildcard expansion, the file > > descriptors which were opened will n

Re: cd // produces unexpected results

2012-06-23 Thread Bob Proulx
Stefano Lattarini wrote: > A little more info, quoting from the Autoconf manual: And I will respond to the quoted part from the autoconf manual realizing that Stefano isn't saying it but just passing the message along. :-) > POSIX lets implementations treat leading // specially, but requires le

Re: **/ directory wildcards leak file descriptors and memory

2012-06-23 Thread Andreas Schwab
This patch should fix it. Andreas. diff --git a/lib/glob/glob.c b/lib/glob/glob.c index c77618f..4fb1d16 100644 --- a/lib/glob/glob.c +++ b/lib/glob/glob.c @@ -725,8 +725,6 @@ glob_vector (pat, dir, flags) FREE (tmplink); } - QUIT; - return ((char **)NULL); }

Re: **/ directory wildcards leak file descriptors and memory

2012-06-23 Thread Andreas Schwab
Chet Ramey writes: > $ ls -la /proc/self/fd You are looking at ls's fds, not bash's. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."

Re: **/ directory wildcards leak file descriptors and memory

2012-06-23 Thread Chet Ramey
On 6/20/12 2:50 PM, Serge van den Boom wrote: > Bash Version: 4.2 > Patch Level: 29 > Release Status: release > > Description: > If you interrupt the evaluation of **/ wildcard expansion, the file > descriptors which were opened will not be closed. > Also, memory used will not b

Re: cd // produces unexpected results

2012-06-23 Thread Chet Ramey
On 6/22/12 5:58 PM, Stefano Lattarini wrote: > On 06/22/2012 09:47 PM, Chet Ramey wrote: >>> By accident I keyed in : >>> >>> cd // >>> >>> and noticed that my prompt included both slashes. >> >> Posix says shells have to leave two leading slashes in a pathname alone. >> Three or more can be collap