GNU bug report logs -
#44320
[PATH] [27.1] Make sure send-string-to-terminal send all contents
Previous Next
Reported by: Lin Sun <lin.sun <at> zoom.us>
Date: Thu, 29 Oct 2020 23:03:02 UTC
Severity: normal
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: Lin Sun <lin.sun <at> zoom.us>, 44320 <at> debbugs.gnu.org
> Date: Fri, 30 Oct 2020 13:38:24 +0100
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> I got a bug that `send-string-to-termina` maybe send part of contents to
> >> terminal, calling `fwrite` in loop to make sure all contents are written.
> >
> > Any idea why does it not write the entire string in the single call,
> > or how to reproduce this? What is the size of the string in the case
> > where it fails to write everything?
>
> fwrite isn't guaranteed to write the entire string in one go, is it? So
> I'm surprised that this doesn't lead to more problems, but I guess it
> doesn't show up more in practice because one usually sends less than one
> block at a time to the terminal?
I understand the basics, I'd just would like to know the details in
this case. fwrite could be interrupted by something, or it could
write only part of the buffer, or something else.
This is very old code, so it is surprising this only comes up now.
I'd rather we understood the issue completely before we decide how to
fix it.
This bug report was last modified 4 years and 288 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.