Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: FreeBSD process substitution bug
- X-seq: zsh-workers 21954
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Steve Atwell <satwell@xxxxxxxxxxxx>, zsh-workers@xxxxxxxxxx
- Subject: Re: FreeBSD process substitution bug
- Date: Sun, 30 Oct 2005 16:33:05 +0000
- In-reply-to: <20051029212156.GA57823@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20051029070656.GA77326@xxxxxxxxxxxxxxxxxxxxx> <200510291002.j9TA2Q5P003942@xxxxxxxxxxxxxxxxx> <20051029212156.GA57823@xxxxxxxxxxxxxxxxxxxxx>
> I did a little more investigation and found the problem. FreeBSD 5.x by
> default only provides file descriptors 0, 1, and 2 for the current
> process in /dev/fd. If you want to be able to access other file
> descriptors, you have to mount the special fdescfs filesystem on
> /dev/fd. The configure test to see if zsh can use /dev/fd succeeds
> because it only tests /dev/fd/0.
Thanks for the research. Can you see if the following gives you a
working command substitution in this case?
Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.41
diff -u -r1.41 configure.ac
--- configure.ac 28 Oct 2005 17:34:33 -0000 1.41
+++ configure.ac 30 Oct 2005 16:31:06 -0000
@@ -1603,7 +1603,7 @@
[Define to the path of the /dev/fd filesystem.])
AC_CACHE_CHECK(for /dev/fd filesystem, zsh_cv_sys_path_dev_fd,
[for zsh_cv_sys_path_dev_fd in /proc/self/fd /dev/fd no; do
- test x`echo ok|cat $zsh_cv_sys_path_dev_fd/0 2>/dev/null` = xok && break
+ test x`echo ok|(exec 3<&0; cat $zsh_cv_sys_path_dev_fd/3 2>/dev/null;)` = xok && break
done])
if test $zsh_cv_sys_path_dev_fd != no; then
AC_DEFINE_UNQUOTED(PATH_DEV_FD, "$zsh_cv_sys_path_dev_fd")
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page still at http://www.pwstephenson.fsnet.co.uk/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author