On Tue, Jun 10, 2008 at 12:28:27PM +0100, Stephane Chazelas wrote:
> Package: posh
> Version: 0.6.7
> Severity: normal
> 
> 
> Doing:
> 
> [ a = a ]
> 
> causes posh to read the content of the current directory which
> slows scripts down significantly if the current directory is big.
> 
> set -f; [ a = a ]
> 
> or
> 
> \[ a = a ]
> 
> stops posh from doing that which suggests globbing is involved.
[...]
> pdksh and mksh don't have the problem:
[...]

Hi Clint,

Looking at the code, pdksh had its own "globit" function to
perform globbing. Part of that, it was checking if globbing was
necessary and that checking includes the check for unmatched
"[".

posh replaced that with a call to libc's glob(3), and that one
doesn't check whether globbing is necessary it would seem and
reads the content of directory in any case. So that bug could be
assigned to glibc I guess.

But then a quick look at uclibc and dietlibc seems to indicate
that they also read the content of the directory in any case as
well.

-- 
Stéphane



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to