zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: "Peter A. Castro" <doctor@fruitbat.org>, zsh-workers@sunsite.dk
Subject: Re: D03 test hang on cygwin with latest sources
Date: Mon, 1 Dec 2008 12:20:19 +0000	[thread overview]
Message-ID: <20081201122019.18043478@news01> (raw)
In-Reply-To: <Pine.LNX.4.64.0811251443420.4752@gremlin.fruitbat.org>

On Tue, 25 Nov 2008 15:26:09 -0800 (PST)
"Peter A. Castro" <doctor@fruitbat.org> 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@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


  reply	other threads:[~2008-12-01 12:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-21  4:08 Vin Shelton
2008-11-21  5:12 ` Bart Schaefer
2008-11-24 17:32   ` Peter Stephenson
2008-11-24 22:31     ` Phil Pennock
2008-11-25  9:56       ` Peter Stephenson
2008-11-25 23:26         ` Peter A. Castro
2008-12-01 12:20           ` Peter Stephenson [this message]
2008-12-02  3:42             ` Peter A. Castro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081201122019.18043478@news01 \
    --to=pws@csr.com \
    --cc=doctor@fruitbat.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).