From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72967 invoked by alias); 10 Oct 2018 11:22:46 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 72953 invoked by uid 89); 10 Oct 2018 11:22:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-101.2 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=mails, H*r:mreue108, executive X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (217.72.192.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Oct 2018 11:22:44 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1My3Ef-1fl0KE0cHf-00zUSn for ; Wed, 10 Oct 2018 13:22:41 +0200 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1My3Ef-1fl0KE0cHf-00zUSn for ; Wed, 10 Oct 2018 13:22:41 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 93492A8036C; Wed, 10 Oct 2018 13:22:40 +0200 (CEST) Date: Wed, 10 Oct 2018 11:22:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: grep < fifo fails Message-ID: <20181010112240.GL20270@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <8100972155fcccd61852c0c9e48cd11b@smtp-cloud9.xs4all.net> <4749b23a0374bf264ad46a0c7466e73e@smtp-cloud9.xs4all.net> <81eb7a95-1334-a421-46e3-64c51800947c@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ee6FjwWxuMujAVRe" Content-Disposition: inline In-Reply-To: <81eb7a95-1334-a421-46e3-64c51800947c@redhat.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SW-Source: 2018-10/txt/msg00087.txt.bz2 --ee6FjwWxuMujAVRe Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1267 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. > >=20 > > Receiving the wrong value in errno forces reset() (in src/grep.c) > > to return false, upon which grep fails. > >=20 > > 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. > >=20 > > The call to S_ISREG() has been removed in v2.27 of grep. > >=20 > > The solution would be either to correct Cygwin's executive or to >=20 > s/executive/dll/ >=20 > > insert a Cygwin-specific kludge in grep (in reset() ). >=20 > I see no reason to do a one-off kludge to my build of grep (since that do= es > not scale - every other app that also makes decisions based on errno valu= es > would have to make the same kludge), compared to just fixing cygwin1.dll = for > everyone. >=20 > But thanks for isolating the problem! I pushed a patch. Thanks for tracking this down, Henri! Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --ee6FjwWxuMujAVRe Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlu94QAACgkQ9TYGna5E T6BG5g//U+3pEb0nyABsBara0BkW+RB+FuncqWIOFW23paXW5a22rXu4fxMqS3Gu mJaFDEHhHW6xQA/iUqo+FrCgd612nMLXp+g+/3TVJmkDeltreJgrIc9hk2Yk3Dm0 bQX36TEGlCLgWbvYgvLC1gr0Xpk+JRa5yYfODfjryy+UFYxr19EOUphWvd6eMJic An2l2H31EjvC1hvqAyrTLXjpDqvhbLMzkAZ2fH/rPXnu5PgwBJEZAoirDGVglc1i y5fd5A4N5m9PKJB+Bs3+QM1pVk0uneLnwUmjfTwmmbIc53Yf7TV2YSMRHbH6YkNI StG/HHbgEcISjXTDoSFk8Kwe6Rbz1oKysd3EJsW20H0HbIbh9MvvTN5wzuQy44M2 1zdgylAvJthwcpPIoJ4jwUnns37OIUCRAt+W4kGn/bhyLo9aAAvVCML1lwLs79kQ Yz4RnfeBbEyB9huJblhpRu0j/7owXl9F2gftQcp5S567msWl2krFy+yxtFD7L0Io M1zmL/8TGDuSVAVetorTucEK+c7bvgtwiN8thdb2Lyc8JYlbtC3B/ktqjNVp8ugX s1MAWy+K/ambj1i16kMpHdzexdFppqQA631ArAcZhR1iyWmelo7cXtlQR4T4N+bF awILfyg6ToaXZMZNSeRQ2+R4JyIY9Jmt2H3L6UU1qSFVT3yBI2M= =pfsl -----END PGP SIGNATURE----- --ee6FjwWxuMujAVRe--