From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25187 invoked by alias); 18 Jul 2017 09:55:02 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 25126 invoked by uid 89); 18 Jul 2017 09:55:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-106.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1486, H*c:application X-HELO: drew.franken.de Received: from mail-n.franken.de (HELO drew.franken.de) (193.175.24.27) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Jul 2017 09:54:59 +0000 Received: from aqua.hirmke.de (aquarius.franken.de [193.175.24.89]) (Authenticated sender: aquarius) by mail-n.franken.de (Postfix) with ESMTPSA id 4BA31721E280C for ; Tue, 18 Jul 2017 11:54:57 +0200 (CEST) Received: from calimero.vinschen.de (calimero.vinschen.de [192.168.129.6]) by aqua.hirmke.de (Postfix) with ESMTP id A438F5E03CB for ; Tue, 18 Jul 2017 11:54:56 +0200 (CEST) Received: by calimero.vinschen.de (Postfix, from userid 500) id 896BAA80637; Tue, 18 Jul 2017 11:54:56 +0200 (CEST) Date: Tue, 18 Jul 2017 09:55:00 -0000 From: Corinna Vinschen To: cygwin-apps@cygwin.com Subject: Re: fflush(NULL) clobbers input streams Message-ID: <20170718095456.GC26902@calimero.vinschen.de> Reply-To: cygwin-apps@cygwin.com Mail-Followup-To: cygwin-apps@cygwin.com References: <87k2376jck.fsf@Rainer.invalid> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="aVD9QWMuhilNxW9f" Content-Disposition: inline In-Reply-To: <87k2376jck.fsf@Rainer.invalid> User-Agent: Mutt/1.8.3 (2017-05-23) X-SW-Source: 2017-07/txt/msg00042.txt.bz2 --aVD9QWMuhilNxW9f Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1501 On Jul 17 19:53, Achim Gratz wrote: >=20 > Perl configure for 5.22.1 on Cygwin 2.4.0 said this: >=20 > --8<---------------cut here---------------start------------->8--- > Checking how to flush all pending stdio output... > Your fflush(NULL) works okay for output streams. > Let's see if it clobbers input pipes... > fflush(NULL) seems to behave okay with input streams. > --8<---------------cut here---------------end--------------->8--- >=20 > I'm reasonably certain that the intervening Perl versions were also this > way, but I didn't keep the log files around unfortunately. >=20 > Now, using Cygwin 2.8.x to configure Perl 5.22.4 I got this instead: >=20 > --8<---------------cut here---------------start------------->8--- > Checking how to flush all pending stdio output... > Your fflush(NULL) works okay for output streams. > Let's see if it clobbers input pipes... > Ouch, fflush(NULL) clobbers input pipes! We will not use it. > Good, at least fflush(stdin) seems to behave okay when stdin is a pipe. > Sigh. Flushing explicitly all the stdio streams doesn't work. > --8<---------------cut here---------------end--------------->8--- >=20 > It seems that fflush is only supposed to discard buffered input data on > seekable files, but not pipes (per POSIX.1-2008), so this looks a > regression to me. Did you try to bisect the issue? Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --aVD9QWMuhilNxW9f Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJZbdrwAAoJEPU2Bp2uRE+gn2cP/2/AMuVzkubPRVHvp0vb16Mj 5jA4J6ixE8l9yLKtPwKtlUDmyVmSLiUuaWzc2UM2M7Jdx+kSj42dOq6PTWvdSeCB Jg+hgBgj650T5DTasU31aAG54jkeZ1bIcK9a5Ez41QW8XPJj2I9YleEGACf7xXAp Xkk/gRfkKhuDvR74hKLy967hC3PRDic01eIYQRkJ305enaxavjgDLvHlul+bfofN soU//hx6t6t3rX7JDtFj23VyzOPTtY4neuIUX1CB3+Sdb+4nKjTOc+DQCCP7DGv1 JRhqSjHaB9L8ctZ1XRZWnGwPocXUKc55Iw9lc8WhHOi/jblH+eg1C1aMLj7Xg2bE Cd6yYtFYLkvZOY1rt8Yfhctno4+YqPbZI4IfoW7GIQJKxVPEBl1NlRV42WNomW7P LuoLPeTxv3RXIT6H/9AP380S0BS5DczN/EIdeouiFGIYo1/ON/UQGBKqxhkwkmNL sikTwEhYLcX+PbFfegtzBW2tVR/fPoBbygr2TI+htr6jg22m6V0b1HTOPmutp0eO gIoQ++r0scjsXYxfbE4wQhUZXRR9Hnfhe+l+UP9e1cr/T9EUlkizLB8aUme9M6ZP AAVubBwXn2E++idEYL5PWaP/9yVlrVw45VAOG0OhhmVe6q1anYseLxIda43l1R+G v2Bkhkhd+YiWV2l9hdmD =hfp6 -----END PGP SIGNATURE----- --aVD9QWMuhilNxW9f--