diff options
| author | Eli Zaretskii | 2016-01-11 18:00:13 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-01-11 18:00:13 +0200 |
| commit | 200675299e24139ccce444a7ca5d59a2aed2891c (patch) | |
| tree | 4ebbd93dc065b2d40633c87019190ef68d0844fe | |
| parent | eef6784ea4932adbce24030b171df6c09bb4736a (diff) | |
| download | emacs-200675299e24139ccce444a7ca5d59a2aed2891c.tar.gz emacs-200675299e24139ccce444a7ca5d59a2aed2891c.zip | |
Avoid unnecessary failures of auto-saving after fatal error
* src/w32.c (map_w32_filename): Avoid non-trivial system calls for
the benefit of FAT volumes if we are called as part of shutting
down due to a fatal error, which probably means we are trying to
auto-save the session.
* src/lread.c (check_obarray): Don't bother making the obarray
valid if we are shutting down due to a fatal error. This avoids
interfering with auto-saving the crashed session.
| -rw-r--r-- | src/lread.c | 6 | ||||
| -rw-r--r-- | src/w32.c | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/lread.c b/src/lread.c index e9f3d7da967..25e3ff01d47 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -3720,7 +3720,11 @@ static size_t oblookup_last_bucket_number; | |||
| 3720 | Lisp_Object | 3720 | Lisp_Object |
| 3721 | check_obarray (Lisp_Object obarray) | 3721 | check_obarray (Lisp_Object obarray) |
| 3722 | { | 3722 | { |
| 3723 | if (!VECTORP (obarray) || ASIZE (obarray) == 0) | 3723 | /* We don't want to signal a wrong-type-argument error when we are |
| 3724 | shutting down due to a fatal error, and we don't want to hit | ||
| 3725 | assertions in VECTORP and ASIZE if the fatal error was during GC. */ | ||
| 3726 | if (!fatal_error_in_progress | ||
| 3727 | && (!VECTORP (obarray) || ASIZE (obarray) == 0)) | ||
| 3724 | { | 3728 | { |
| 3725 | /* If Vobarray is now invalid, force it to be valid. */ | 3729 | /* If Vobarray is now invalid, force it to be valid. */ |
| 3726 | if (EQ (Vobarray, obarray)) Vobarray = initial_obarray; | 3730 | if (EQ (Vobarray, obarray)) Vobarray = initial_obarray; |
| @@ -3210,7 +3210,8 @@ map_w32_filename (const char * name, const char ** pPath) | |||
| 3210 | return shortname; | 3210 | return shortname; |
| 3211 | } | 3211 | } |
| 3212 | 3212 | ||
| 3213 | if (is_fat_volume (name, (const char **)&path)) /* truncate to 8.3 */ | 3213 | if (!fatal_error_in_progress /* disable fancy processing during crash */ |
| 3214 | && is_fat_volume (name, (const char **)&path)) /* truncate to 8.3 */ | ||
| 3214 | { | 3215 | { |
| 3215 | register int left = 8; /* maximum number of chars in part */ | 3216 | register int left = 8; /* maximum number of chars in part */ |
| 3216 | register int extn = 0; /* extension added? */ | 3217 | register int extn = 0; /* extension added? */ |