public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-apps@cygwin.com
Subject: Re: fflush(NULL) clobbers input streams
Date: Tue, 18 Jul 2017 09:55:00 -0000	[thread overview]
Message-ID: <20170718095456.GC26902@calimero.vinschen.de> (raw)
In-Reply-To: <87k2376jck.fsf@Rainer.invalid>

[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

On Jul 17 19:53, Achim Gratz wrote:
> 
> Perl configure for 5.22.1 on Cygwin 2.4.0 said this:
> 
> --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---
> 
> I'm reasonably certain that the intervening Perl versions were also this
> way, but I didn't keep the log files around unfortunately.
> 
> Now, using Cygwin 2.8.x to configure Perl 5.22.4 I got this instead:
> 
> --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---
> 
> 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

-- 
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: 819 bytes --]

  reply	other threads:[~2017-07-18  9:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-17 17:53 Achim Gratz
2017-07-18  9:55 ` Corinna Vinschen [this message]
2017-07-18 10:51   ` Corinna Vinschen
2017-07-18 19:21     ` Achim Gratz
2017-07-18 22:41       ` Ken Brown
2017-07-19  2:16         ` Ken Brown
2017-07-19  8:46           ` Corinna Vinschen
2017-07-19 17:03             ` [GOLDSTAR] " Corinna Vinschen
2017-07-19 17:20               ` Ken Brown
2017-07-19 20:40               ` Andrew Schulman
2017-07-19 17:11             ` Achim Gratz
2017-07-19 17:03           ` Achim Gratz
2017-07-18 18:33   ` Achim Gratz

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=20170718095456.GC26902@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin-apps@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).