]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fopen_termscript): Add BLOCK_INPUT around fclose.
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Tue, 20 Mar 2007 08:49:37 +0000 (08:49 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Tue, 20 Mar 2007 08:49:37 +0000 (08:49 +0000)
(Fsend_string_to_terminal): Add BLOCK_INPUT around fwrite.

src/dispnew.c

index 489c7c647e16a4946beacabac187dcbbff0a1635..a7efa8249ba3edff74208edf4bcdb2535d98be64 100644 (file)
@@ -6360,7 +6360,12 @@ FILE = nil means just close any termscript file currently open.  */)
      (file)
      Lisp_Object file;
 {
-  if (termscript != 0) fclose (termscript);
+  if (termscript != 0)
+    {
+      BLOCK_INPUT;
+      fclose (termscript);
+      UNBLOCK_INPUT;
+    }
   termscript = 0;
 
   if (! NILP (file))
@@ -6383,6 +6388,7 @@ Control characters in STRING will have terminal-dependent effects.  */)
 {
   /* ??? Perhaps we should do something special for multibyte strings here.  */
   CHECK_STRING (string);
+  BLOCK_INPUT;
   fwrite (SDATA (string), 1, SBYTES (string), stdout);
   fflush (stdout);
   if (termscript)
@@ -6391,6 +6397,7 @@ Control characters in STRING will have terminal-dependent effects.  */)
              termscript);
       fflush (termscript);
     }
+  UNBLOCK_INPUT;
   return Qnil;
 }