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.

Chet

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

  • Re: Is thi... Dmitry Goncharov via Bug reports for the GNU Bourne Again SHell
    • Re: I... Chet Ramey
      • R... Chet Ramey
        • ... Dmitry Goncharov via Bug reports for the GNU Bourne Again SHell
        • ... Chet Ramey
          • ... George R Goffe
            • ... Chet Ramey
              • ... Chet Ramey
                • ... Chet Ramey
                • ... Chet Ramey
                • ... Lawrence Velázquez
                • ... Chet Ramey

Reply via email to