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

From: Eli Zaretskii <[email-masked]>
Date: Mon, 02 Nov 2020 20:12:52 +0200

> From: Andreas Schwab <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked],
>   [email-masked]
> Date: Mon, 02 Nov 2020 19:02:32 +0100
> 
> >> Correct.  A partial write never reports an error.
> >
> > Not sure I understand the last sentence: in this case 'fwrite' should
> > have returned a value less than the amount it was asked to write, and
> > errno should have been set to EINTR, correct?
> 
> Only when it actually writes the data.  Without fflush, you will never
> know when that happens.

But that means 'fwrite' could return zero, if its very first call to
'write' got interrupted, no?  In which case the proposed patch would
not DTRT.