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

From: Eli Zaretskii <[email-masked]>
Date: Tue, 03 Nov 2020 17:29:51 +0200

> Date: Tue, 3 Nov 2020 08:56:29 +0800
> From: LinSun <[email-masked]>
> Cc: "[email-masked]" <[email-masked]>, 
> 	"[email-masked]" <[email-masked]>, 
> 	"[email-masked]" <[email-masked]>
> 
> > On what OS do you see the problem?
> 
> It’s CentOS 7 (kernel 3.10.0, x86_64), I ssh from Cygwin, testing the testing.el with emacs 27, some times
> successful to show the *.six image some times failed, while cat *.six always success.

Does the below fix the problem, if applied to the unpatched tree in
Git?

diff --git a/src/dispnew.c b/src/dispnew.c
index 3f2ae3e..a5e50b3 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5904,8 +5904,10 @@ DEFUN ("send-string-to-terminal", Fsend_string_to_terminal,
 	}
       out = tty->output;
     }
+  unrequest_sigio ();
   fwrite (SDATA (string), 1, SBYTES (string), out);
   fflush (out);
+  request_sigio ();
   unblock_input ();
   return Qnil;
 }