changeset 76621:685fa6c9ae44

(Fopen_termscript): Add BLOCK_INPUT around fclose. (Fsend_string_to_terminal): Add BLOCK_INPUT around fwrite.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Tue, 20 Mar 2007 08:49:37 +0000
parents 61e085a71af3
children e0b9cd18e1b6
files src/dispnew.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/dispnew.c	Tue Mar 20 08:49:19 2007 +0000
+++ b/src/dispnew.c	Tue Mar 20 08:49:37 2007 +0000
@@ -6360,7 +6360,12 @@
      (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 @@
 {
   /* ??? 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 @@
 	      termscript);
       fflush (termscript);
     }
+  UNBLOCK_INPUT;
   return Qnil;
 }