bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44320: [PATH] [27.1] Make sure send-string-to-terminal send all cont


From: Lars Ingebrigtsen
Subject: bug#44320: [PATH] [27.1] Make sure send-string-to-terminal send all contents
Date: Mon, 02 Nov 2020 17:30:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> What is the significance of 4K bytes in this case?  Is 'fwrite'
> documented not to write more than that?  I couldn't find such
> documentation.

writes that are less than a system block size are unlikely to be chopped
into parts.

> Anyway, if we need to fix calls to 'fwrite', we should provide
> something similar to emacs_write, and use it everywhere we use
> 'fwrite' now.

I can't see anything in the fwrite man page that guarantees that it'll
write all that we tell it to write:

RETURN VALUE
       On success, fread() and fwrite() return the number of items read or writ‐
       ten.  This number equals the number of bytes transferred only  when  size
       is  1.  If an error occurs, or the end of the file is reached, the return
       value is a short item count (or zero).


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]