From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: grep < fifo fails
Date: Wed, 10 Oct 2018 11:22:00 -0000 [thread overview]
Message-ID: <20181010112240.GL20270@calimero.vinschen.de> (raw)
In-Reply-To: <81eb7a95-1334-a421-46e3-64c51800947c@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1279 bytes --]
On Oct 8 10:03, Eric Blake wrote:
> On 10/8/18 3:24 AM, Houder wrote:
> > grep fails on Cygwin because lseek() on Cygwin fails to recognize
> > that it is applied to a FIFO. As result of that, it returns EINVAL
> > in errno, where it should return ESPIPE.
> >
> > Receiving the wrong value in errno forces reset() (in src/grep.c)
> > to return false, upon which grep fails.
> >
> > Before v2.27 of grep, a call to S_ISREG(st->st_mode) in reset()
> > prevented the call of lseek() and made reset() return true.
> >
> > The call to S_ISREG() has been removed in v2.27 of grep.
> >
> > The solution would be either to correct Cygwin's executive or to
>
> s/executive/dll/
>
> > insert a Cygwin-specific kludge in grep (in reset() ).
>
> I see no reason to do a one-off kludge to my build of grep (since that does
> not scale - every other app that also makes decisions based on errno values
> would have to make the same kludge), compared to just fixing cygwin1.dll for
> everyone.
>
> But thanks for isolating the problem!
I pushed a patch. Thanks for tracking this down, Henri!
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-10-10 11:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-03 15:37 Ole Tange
2018-10-03 16:50 ` Marco Atzeri
2018-10-03 18:46 ` Houder
2018-10-04 16:02 ` Houder
2018-10-05 15:32 ` Houder
2018-10-08 8:24 ` Houder
2018-10-08 15:03 ` Eric Blake
2018-10-10 11:22 ` Corinna Vinschen [this message]
2018-10-10 9:53 ` Houder
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=20181010112240.GL20270@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin@cygwin.com \
/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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).