Menu

#15 emulation of /dev/fd/ incomplete

open
nobody
None
6
2013-01-25
2001-06-04
No

The documentation claims that /dev/fd is emulated on
operating systems which lack support for it when
performing checks in conditional expressions. The
emulation is not complete though and does not work for
the -a, -e, -r, -w and -x tests. This results in one
test failure on Compaq Tru64 (see zsh-workers/14450).
This was fixed for AIX in zsh-workers/10073 by using
the faccessx system call but it is an AIX specific
call. What we need is something similar which will
work on other platforms - the equivalent of access but
taking an open file descriptor instead of a filename.
This could be done with a wrapper around fstat but I'm
hoping someone knows of a better way.

Discussion