mailing list of musl libc
 help / color / mirror / code / Atom feed
* non-standard implementation of fflush()
@ 2019-11-21 18:31 y38h5z
  2019-11-21 19:04 ` Rich Felker
  0 siblings, 1 reply; 4+ messages in thread
From: y38h5z @ 2019-11-21 18:31 UTC (permalink / raw)
  To: musl

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

Hello everyone,

the implementation of fflush() in musl doesn't seem to conform to the opengroup standard:

https://pubs.opengroup.org/onlinepubs/009695399/functions/fflush.html

In addition to flushing unwritten data, which is expected, musl flushes the read buffer when calling fflush(). This leads to data loss in bidirectional communication uses. Other standard libraries don't do this.

As a reference compare musl to openbsd's libc:

https://git.musl-libc.org/cgit/musl/tree/src/stdio/fflush.c
https://github.com/openbsd/src/blob/master/lib/libc/stdio/fflush.c

I think this is unexpected behavior and should be changed.

Greetings,
  Michael

[-- Attachment #2: Type: text/html, Size: 1132 bytes --]

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

end of thread, other threads:[~2019-11-23 21:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-21 18:31 non-standard implementation of fflush() y38h5z
2019-11-21 19:04 ` Rich Felker
     [not found]   ` <I6lA7ERFkqk6k724VlnK6OZT6Uy2zzixDgjODO9RLz0K0BW86wWppsTn8ockD67PPoO09kzCdwyXs6NZzTVf6kWj9VWtotdFS8doVeYzJck=@protonmail.com>
2019-11-21 22:58     ` Rich Felker
2019-11-23 21:35       ` y38h5z

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).