From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: Re: [PATCH] Use access instead of stat in hashdir
Date: Tue, 7 Feb 2012 16:40:56 -0800 [thread overview]
Message-ID: <CAH+w=7ZJUPadi5L-JGYEAF5+tkcGrZEPvhR_woBJq-kd+69fig@mail.gmail.com> (raw)
In-Reply-To: <20120207224613.GC4312@Xye>
On Tue, Feb 7, 2012 at 2:46 PM, Raghavendra D Prabhu
<raghu.prabhu13@gmail.com> wrote:
> * On Mon, Feb 06, 2012 at 08:20:08AM -0800, Bart Schaefer
> <schaefer@brasslantern.com> 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."
prev parent reply other threads:[~2012-02-08 0:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-06 13:13 Raghavendra D Prabhu
2012-02-06 16:20 ` Bart Schaefer
2012-02-06 16:52 ` Bart Schaefer
2012-02-07 22:46 ` Raghavendra D Prabhu
2012-02-08 0:40 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH+w=7ZJUPadi5L-JGYEAF5+tkcGrZEPvhR_woBJq-kd+69fig@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).