Message110943
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!)? |
|
Date |
User |
Action |
Args |
2010-07-20 18:26:08 | ngie | set | recipients:
+ ngie, r.david.murray, docs@python |
2010-07-20 18:26:08 | ngie | set | messageid: <1279650368.65.0.870818991055.issue9311@psf.upfronthosting.co.za> |
2010-07-20 18:26:06 | ngie | link | issue9311 messages |
2010-07-20 18:26:06 | ngie | create | |
|