From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk
Subject: Re: D03 test hang on cygwin with latest sources
Date: Tue, 25 Nov 2008 09:56:46 +0000 [thread overview]
Message-ID: <200811250956.mAP9ukDw026001@news01.csr.com> (raw)
In-Reply-To: <20081124223104.GA37873@redoubt.spodhuis.org>
Phil Pennock wrote:
> On 2008-11-24 at 17:32 +0000, Peter Stephenson wrote:
> > Right, the behaviour isn't new. It seems as if the subprocess is
> > reading EOF from the input.
> >
> > % foo() { print $1; print hello >$1; [[ -e $1 ]] || print Ouch! }
> > % foo >(sleep 1; read foo || print Failed)
> > /proc/self/fd/12
> > Failed
>
> ...% zsh -f
> redoubt% echo $ZSH_VERSION
> 4.3.6
> redoubt% foo() { print $1; print hello >$1; [[ -e $1 ]] || print Ouch! }
> redoubt% foo >(sleep 1; read foo || print Failed)
> /tmp/zshQCDdM0
> redoubt%
>
> Looks like a regression after all.
Did you try it in 4.3.9? I tried it on three different versions, before
and after 4.3.6, and got the same result. If your system is doing
something different I'd like to find out what.
I *can* get the test to pass if I undefine PATH_DEV_FD and define
HAVE_FIFOS, so it looks like this is the way forward. Some
investigation of why HAVE_FIFOS doesn't get define automatically would
be useful.
(I tried adding a "sync" pipe to getpipe() in the same way as in the
other pipe code, but it didn't seem to help.)
I'm also finding that I can read files with mode 000, so the [[ -r
... ]] test fails (but it's clearly doing the right thing, since "cat"
on the file works, too). This may be because I have administrator
rights. Unless some Cygwin expert can do this better, I'll apply the
following.
This is with Cygwin updated from the stable versions yesterday.
Index: Test/C02cond.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/C02cond.ztst,v
retrieving revision 1.22
diff -u -r1.22 C02cond.ztst
--- Test/C02cond.ztst 26 Feb 2008 20:50:13 -0000 1.22
+++ Test/C02cond.ztst 25 Nov 2008 09:54:00 -0000
@@ -94,6 +94,10 @@
if (( EUID == 0 )); then
print -u$ZTST_fd 'Warning: Not testing [[ ! -r file ]] (root reads anything)'
[[ -r zerolength && -r unmodish ]]
+ elif [[ $OSTYPE = cygwin ]]; then
+ print -u$ZTST_fd 'Warning: Not testing [[ ! -r file ]]
+ (all files created by user may be readable)'
+ [[ -r zerolength ]]
else
[[ -r zerolength && ! -r unmodish ]]
fi
--
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
next prev parent reply other threads:[~2008-11-25 9:57 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 [this message]
2008-11-25 23:26 ` Peter A. Castro
2008-12-01 12:20 ` Peter Stephenson
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=200811250956.mAP9ukDw026001@news01.csr.com \
--to=pws@csr.com \
--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).