ISTR this may have already been reported, but I'm not sure.
Descriptor 0 may have been inherited from a differently-privileged
process, or the file it's connected to may have had its permissions
changed, so it's not necessarily open()able for reading, thus this
test -r fails.
--- bash-2.05b/aclocal.m4~ 2002-06-25 09:45:21.000000000 -0400
+++ bash-2.05b/aclocal.m4 2002-08-28 15:09:23.000000000 -0400
@@ -1526,9 +1526,9 @@
AC_DEFUN(BASH_CHECK_DEV_FD,
[AC_MSG_CHECKING(whether /dev/fd is available)
AC_CACHE_VAL(bash_cv_dev_fd,
-[if test -d /dev/fd && test -r /dev/fd/0; then
+[if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then
bash_cv_dev_fd=standard
- elif test -d /proc/self/fd && test -r /proc/self/fd/0; then
+ elif test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then
bash_cv_dev_fd=whacky
else
bash_cv_dev_fd=absent
paul
[Prev in Thread]
Current Thread
[Next in Thread]
BASH_CHECK_DEV_FD fails if stdin is attached to an unreadable file,
Paul Jarc<=