This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ngie
Recipients docs@python, ngie, r.david.murray
Date 2010-07-20.18:26:06
SpamBayes Score 0.029219227
Marked as misclassified No
Message-id <1279650368.65.0.870818991055.issue9311@psf.upfronthosting.co.za>
In-reply-to
Content
Well, bash screws up in this dept:

$ ls -l typescript
-rw-r--r--  1 gcooper  gcooper  37875 Jul 12 22:19 typescript
$ sudo sh -c 'test -x typescript; echo $?'
1
$ sudo bash -c 'test -x typescript; echo $?'
0
$ csh
%if (-x typescript) then
if? echo "executable"
if? endif
%

test(1) is a built-in in bash; on FreeBSD/NetBSD(/OpenBSD?) it's a standalone app (which uses eaccess(2)). csh does some tricky code for testing file access in sh.exp.c (see sh_access).

perl does some tricky stuff in pp_sys.c (look for pp_ftrread), where it 
uses eaccess(2) if it's present, else falls back to access(2) to do its bidding. So maybe os.access should use eaccess(2) if it's present on the OS instead of access(2), and note that the item is OS implementation dependent (beware!)?
History
Date User Action Args
2010-07-20 18:26:08ngiesetrecipients: + ngie, r.david.murray, docs@python
2010-07-20 18:26:08ngiesetmessageid: <1279650368.65.0.870818991055.issue9311@psf.upfronthosting.co.za>
2010-07-20 18:26:06ngielinkissue9311 messages
2010-07-20 18:26:06ngiecreate