Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Re: [PATCH] Use access instead of stat in hashdir



On Tue, Feb 7, 2012 at 2:46 PM, Raghavendra D Prabhu
<raghu.prabhu13@xxxxxxxxx> wrote:
> * On Mon, Feb 06, 2012 at 08:20:08AM -0800, Bart Schaefer
> <schaefer@xxxxxxxxxxxxxxxx> wrote:
>> } faster rehash when it is done. I came across this when I noticed
>> } too many stat calls while 'strace -c'
>>
>> It also results in treating non-regular files as candidates for being
>> in the hash table, unless there's something about access() that is
>> implicitly performing the S_ISREG() test.
>
> Need to verify this but for X_OK the file will need to be regular right ?

DESCRIPTION
       access()  checks whether the process would be allowed to read, write or
       test for existence of the file (or other file system object) whose name
       is  pathname.   If  pathname is a symbolic link permissions of the file
       referred to by this symbolic link are tested. [...]

       Only  access  bits  are checked, not the file type or contents. [...]

       If  the process has appropriate privileges, an implementation may indi-
       cate success for X_OK even if none of the execute file permission  bits
       are set.

Note "or other file system object."



Messages sorted by: Reverse Date, Date, Thread, Author