public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* fflush(NULL) clobbers input streams
@ 2017-07-17 17:53 Achim Gratz
  2017-07-18  9:55 ` Corinna Vinschen
  0 siblings, 1 reply; 13+ messages in thread
From: Achim Gratz @ 2017-07-17 17:53 UTC (permalink / raw)
  To: cygwin-apps


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.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-07-19 20:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-17 17:53 fflush(NULL) clobbers input streams Achim Gratz
2017-07-18  9:55 ` Corinna Vinschen
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

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).