summaryrefslogtreecommitdiff
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-11-10 15:54:33 +0000
committerRichard M. Stallman <rms@gnu.org>1995-11-10 15:54:33 +0000
commit2070f28a57de3257933617faa572fce69f46e8ab (patch)
tree3787cc3aa46699a5206e6f11216de58cf59d6ce6 /src/keyboard.c
parent6e99463c44223c46d277ebb97d0abb66b38dfbc0 (diff)
downloademacs-2070f28a57de3257933617faa572fce69f46e8ab.tar.gz
(interrupt_signal): Do special things in GC.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c31
1 files changed, 24 insertions, 7 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 8c782b65e20..ee31c02f478 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -6949,18 +6949,35 @@ interrupt_signal (signalnum) /* If we don't have an argument, */
is used. Note that [Enter] is not echoed by dos. */
cursor_to (0, 0);
#endif
- printf ("Auto-save? (y or n) ");
- fflush (stdout);
- if (((c = getchar ()) & ~040) == 'Y')
+ /* It doesn't work to autosave while GC is in progress;
+ the code used for auto-saving doesn't cope with the mark bit. */
+ if (!gc_in_progress)
{
- Fdo_auto_save (Qt, Qnil);
+ printf ("Auto-save? (y or n) ");
+ fflush (stdout);
+ if (((c = getchar ()) & ~040) == 'Y')
+ {
+ Fdo_auto_save (Qt, Qnil);
#ifdef MSDOS
- printf ("\r\nAuto-save done");
+ printf ("\r\nAuto-save done");
#else /* not MSDOS */
- printf ("Auto-save done\n");
+ printf ("Auto-save done\n");
#endif /* not MSDOS */
+ }
+ while (c != '\n') c = getchar ();
}
- while (c != '\n') c = getchar ();
+ else
+ {
+ /* During GC, it must be safe to reenable quitting again. */
+ Vinhibit_quit = Qnil;
+#ifdef MSDOS
+ printf ("\r\n");
+#endif /* not MSDOS */
+ printf ("Garbage collection in progress; cannot auto-save now\r\n");
+ printf ("but will instead do a real quit after garbage collection ends\r\n");
+ fflush (stdout);
+ }
+
#ifdef MSDOS
printf ("\r\nAbort? (y or n) ");
#else /* not MSDOS */