[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BASH_CHECK_DEV_FD fails if stdin is attached to an unreadable file
From: |
Paul Jarc |
Subject: |
BASH_CHECK_DEV_FD fails if stdin is attached to an unreadable file |
Date: |
Wed, 28 Aug 2002 19:20:28 -0400 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu) |
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 <=