diff options
| author | YAMAMOTO Mitsuharu | 2007-03-20 08:49:53 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2007-03-20 08:49:53 +0000 |
| commit | aab12958c67ed446ee355f455ae14be453b0362b (patch) | |
| tree | ef5a4dfac1d65baa772b5d9bb91f14ebb8939ea6 | |
| parent | 2c1e440960fed94bb10cc3cc1e846baa109a8fc8 (diff) | |
| download | emacs-aab12958c67ed446ee355f455ae14be453b0362b.tar.gz emacs-aab12958c67ed446ee355f455ae14be453b0362b.zip | |
(do_auto_save_unwind): Add BLOCK_INPUT around fclose.
(Fdo_auto_save): Add BLOCK_INPUT around fwrite.
| -rw-r--r-- | src/fileio.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c index df6a6668766..3523c5cb487 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -5804,7 +5804,11 @@ do_auto_save_unwind (arg) /* used as unwind-protect function */ | |||
| 5804 | FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; | 5804 | FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; |
| 5805 | auto_saving = 0; | 5805 | auto_saving = 0; |
| 5806 | if (stream != NULL) | 5806 | if (stream != NULL) |
| 5807 | fclose (stream); | 5807 | { |
| 5808 | BLOCK_INPUT; | ||
| 5809 | fclose (stream); | ||
| 5810 | UNBLOCK_INPUT; | ||
| 5811 | } | ||
| 5808 | return Qnil; | 5812 | return Qnil; |
| 5809 | } | 5813 | } |
| 5810 | 5814 | ||
| @@ -5934,6 +5938,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) | |||
| 5934 | if (STRINGP (b->auto_save_file_name) | 5938 | if (STRINGP (b->auto_save_file_name) |
| 5935 | && stream != NULL && do_handled_files == 0) | 5939 | && stream != NULL && do_handled_files == 0) |
| 5936 | { | 5940 | { |
| 5941 | BLOCK_INPUT; | ||
| 5937 | if (!NILP (b->filename)) | 5942 | if (!NILP (b->filename)) |
| 5938 | { | 5943 | { |
| 5939 | fwrite (SDATA (b->filename), 1, | 5944 | fwrite (SDATA (b->filename), 1, |
| @@ -5943,6 +5948,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) | |||
| 5943 | fwrite (SDATA (b->auto_save_file_name), 1, | 5948 | fwrite (SDATA (b->auto_save_file_name), 1, |
| 5944 | SBYTES (b->auto_save_file_name), stream); | 5949 | SBYTES (b->auto_save_file_name), stream); |
| 5945 | putc ('\n', stream); | 5950 | putc ('\n', stream); |
| 5951 | UNBLOCK_INPUT; | ||
| 5946 | } | 5952 | } |
| 5947 | 5953 | ||
| 5948 | if (!NILP (current_only) | 5954 | if (!NILP (current_only) |