Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: D03 test hang on cygwin with latest sources
- X-seq: zsh-workers 26103
- From: Peter Stephenson <pws@xxxxxxx>
- To: "Peter A. Castro" <doctor@xxxxxxxxxxxx>, zsh-workers@xxxxxxxxxx
- Subject: Re: D03 test hang on cygwin with latest sources
- Date: Mon, 1 Dec 2008 12:20:19 +0000
- In-reply-to: <Pine.LNX.4.64.0811251443420.4752@xxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: CSR
- References: <20a807210811202008o34865319qe1840896992ac48d@xxxxxxxxxxxxxx> <081120211244.ZM30106@xxxxxxxxxxxxxxxxxxxxxx> <20081124173230.31422068@news01> <20081124223104.GA37873@xxxxxxxxxxxxxxxxxxxx> <200811250956.mAP9ukDw026001@xxxxxxxxxxxxxx> <Pine.LNX.4.64.0811251443420.4752@xxxxxxxxxxxxxxxxxxxx>
On Tue, 25 Nov 2008 15:26:09 -0800 (PST)
"Peter A. Castro" <doctor@xxxxxxxxxxxx> wrote:
> Well, configure.ac has an explicit check for cygwin and disables the feature:
>
> dnl -----------
> dnl named FIFOs
> dnl -----------
> AC_CACHE_CHECK(if named FIFOs work,
> zsh_cv_sys_fifo,
> [if test "$host_os" = cygwin; then
> zsh_cv_sys_fifo=no
> else
So that didn't take long to check, after all...
> The other thing about this is that the fifo test code fails but the
> reason appears to be a race condition between the parent and child
> creating the fifo. I've modified the example thus:
With most FIFO implementations this wouldn't be necessary since after the
FIFO is created both the read and the write would block if there's nothing
at the other end. I therefore don't know enough to provide a robust fix.
I've simply changed the Cygwin-specific code above.
> With the above changes the 'foo' test above works, though
> Test/C02cond.ztst still generates an error.
I fixed that, so all tests pass (except the multibyte test which is
skipped).
Thanks for the notes.
By the way, do you know what the status is under Vista? I'm still getting
more than occasional fatal DLL conflicts. Last time I checked the only
fixes for this were ad-hoc magic.
Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.113
diff -u -r1.113 configure.ac
--- configure.ac 18 Nov 2008 10:14:35 -0000 1.113
+++ configure.ac 1 Dec 2008 12:12:22 -0000
@@ -1787,9 +1787,17 @@
AH_TEMPLATE([PATH_DEV_FD],
[Define to the path of the /dev/fd filesystem.])
AC_CACHE_CHECK(for /dev/fd filesystem, zsh_cv_sys_path_dev_fd,
+[if test "$host_os" = cygwin; then
+dnl In current (2008/12/01) versions of Cygwin these are present but don't
+dnl seem to work smoothly for process substitution; no great surprise
+dnl since getting processes to work at all on Cygwin is a big challenge.
+dnl We'll rely on FIFOs, since they do what we need.
+zsh_cv_sys_path_dev_fd=no
+else
[for zsh_cv_sys_path_dev_fd in /proc/self/fd /dev/fd no; do
test x`echo ok|(exec 3<&0; cat $zsh_cv_sys_path_dev_fd/3 2>/dev/null;)` = xok && break
- done])
+ done]
+fi])
if test x$zsh_cv_sys_path_dev_fd != xno; then
AC_DEFINE_UNQUOTED(PATH_DEV_FD, "$zsh_cv_sys_path_dev_fd")
fi
@@ -1954,10 +1962,13 @@
dnl -----------
dnl named FIFOs
dnl -----------
+dnl
+dnl Named FIFOs work well enough on recent versions of Cygwin
+dnl to provide what we want. Simply enable them.
AC_CACHE_CHECK(if named FIFOs work,
zsh_cv_sys_fifo,
[if test "$host_os" = cygwin; then
-zsh_cv_sys_fifo=no
+zsh_cv_sys_fifo=yes
else
AC_TRY_RUN([
#include <fcntl.h>
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author