[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "*** INTERNAL: readdir: Invalid argument" error
From: |
Edward Welbourne |
Subject: |
Re: "*** INTERNAL: readdir: Invalid argument" error |
Date: |
Wed, 15 May 2013 17:45:59 +0000 |
>> > In any case, there's no reason to use any of this just to check
>> > whether a file by a specific name exists in a directory.
>>
>> Are you saying you'd just walk along PATH doing a stat() or access()
>> or equivalent on <dir>/sh.exe?
>
> Exactly. Right now, the code already walks along PATH, and constructs
> <dir>/sh.exe, but instead of calling 'stat' or 'access', it calls
> 'file_exists_p', and the side effect of that is that Make reads the
> entire directory <dir> into its internal storage, hashes it, etc.
Am I the only one finding it hard to believe that's anything but hugely
inefficient ? Testing for the existence of a file should not involve
iterating the whole of its directory ! Well, at least, not in userspace
code - if the O/S's implementation of the system function does that,
that's the O/S's affair.
Eddy.
- "*** INTERNAL: readdir: Invalid argument" error, Eli Zaretskii, 2013/05/15
- Re: "*** INTERNAL: readdir: Invalid argument" error, Paul Smith, 2013/05/15
- Re: "*** INTERNAL: readdir: Invalid argument" error, David Boyce, 2013/05/15
- Re: "*** INTERNAL: readdir: Invalid argument" error, Eli Zaretskii, 2013/05/15
- Re: "*** INTERNAL: readdir: Invalid argument" error, David Boyce, 2013/05/15
- Re: "*** INTERNAL: readdir: Invalid argument" error, Eli Zaretskii, 2013/05/15
- Re: "*** INTERNAL: readdir: Invalid argument" error,
Edward Welbourne <=
- Re: "*** INTERNAL: readdir: Invalid argument" error, Paul Smith, 2013/05/15
- Re: "*** INTERNAL: readdir: Invalid argument" error, David Boyce, 2013/05/15
- Re: "*** INTERNAL: readdir: Invalid argument" error, Eli Zaretskii, 2013/05/15