Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Re: [PATCH] Use access instead of stat in hashdir
- X-seq: zsh-workers 30191
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: Re: [PATCH] Use access instead of stat in hashdir
- Date: Tue, 7 Feb 2012 16:40:56 -0800
- In-reply-to: <20120207224613.GC4312@Xye>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20120206131302.GA46184@Xye> <120206082008.ZM8593@torch.brasslantern.com> <20120207224613.GC4312@Xye>
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