[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is this a bug?

From: Chet Ramey
Subject: Re: Is this a bug?
Date: Thu, 6 Aug 2020 16:10:36 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 8/6/20 1:53 PM, George R Goffe wrote:
> Hi,
> I apologize for bothering you with this question.
> I have several directories on a system with > 300k files. When I use filename 
> completion bash freezes for over a minute depending on the number of files. 
> I'm pretty sure that bash has to read the directory to do the completion but 
> the read appears to be uninterruptible. Is this a bug?

Can you tell what system call bash is executing? Some file systems make
the system call underlying readdir() uninterruptible.

In general, the readline filename completion function that calls readdir
only reads a single directory entry at a time, and returns it to a caller.
If the SIGINT causes readdir to return NULL, the function returns normally.
If readdir returns a valid entry, the caller (e.g., rl_completion_matches)
checks for receipt of a signal. That should be enough to terminate the
directory read.

> Again, I apologize for bothering you with this.

No bother.


``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]