changeset 76622:e0b9cd18e1b6

(do_auto_save_unwind): Add BLOCK_INPUT around fclose. (Fdo_auto_save): Add BLOCK_INPUT around fwrite.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Tue, 20 Mar 2007 08:49:53 +0000
parents 685fa6c9ae44
children 27b51de2d1d7
files src/fileio.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Tue Mar 20 08:49:37 2007 +0000
+++ b/src/fileio.c	Tue Mar 20 08:49:53 2007 +0000
@@ -5804,7 +5804,11 @@
   FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer;
   auto_saving = 0;
   if (stream != NULL)
-    fclose (stream);
+    {
+      BLOCK_INPUT;
+      fclose (stream);
+      UNBLOCK_INPUT;
+    }
   return Qnil;
 }
 
@@ -5934,6 +5938,7 @@
 	if (STRINGP (b->auto_save_file_name)
 	    && stream != NULL && do_handled_files == 0)
 	  {
+	    BLOCK_INPUT;
 	    if (!NILP (b->filename))
 	      {
 		fwrite (SDATA (b->filename), 1,
@@ -5943,6 +5948,7 @@
 	    fwrite (SDATA (b->auto_save_file_name), 1,
 		    SBYTES (b->auto_save_file_name), stream);
 	    putc ('\n', stream);
+	    UNBLOCK_INPUT;
 	  }
 
 	if (!NILP (current_only)