mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] fputs stdout lost characters on nonblock tty
@ 2023-03-07 12:42 somethingfnothing
  2023-03-07 13:18 ` Rich Felker
  0 siblings, 1 reply; 2+ messages in thread
From: somethingfnothing @ 2023-03-07 12:42 UTC (permalink / raw)
  To: musl@lists.openwall.com 

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

hi


I use fputs to write string to stdout, sometimes it will lost some characters, the error is EAGAIN, my tty is nonblock.


fputs did not handle this error, it reset the "wpos"  "wbase" "wend" and return -1 when recive error, thus the last characters was lost, and I cannot know how much characters was lost


I think fputs should retry write when recive EAGAIN since app cannot know how much characters was lost









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

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

end of thread, other threads:[~2023-03-07 13:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07 12:42 [musl] fputs stdout lost characters on nonblock tty somethingfnothing
2023-03-07 13:18 ` Rich Felker

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