GNU bug report logs -
#6585
23.1; Hang / CPU 100% on background interaction when in minibuffer
Previous Next
Reported by: jcornez <at> ravenpack.com (Jason Cornez)
Date: Thu, 8 Jul 2010 16:24:02 UTC
Severity: normal
Found in version 23.1
Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 08/31/2010 03:09 PM, Stefan Monnier wrote:
> 100% agreement. Patch welcome,
>
>
> Stefan
How about something like this...
----8<----
src/keyboard.c /usr/local/emacs-23.2/src/keyboard.c
*** src/keyboard.c 2010-04-04 00:26:07.000000000 +0200
--- /usr/local/emacs-23.2/src/keyboard.c 2010-08-31
17:03:14.648740153 +0200
*************** interrupt_signal (signalnum) /* If we do
*** 11122,11127 ****
--- 11122,11136 ----
errno = old_errno;
}
+
+ /* JSC: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6585 */
+
+ /* If emacs is stuck because `inhibit-quit' is true, then keep track
+ of the number of times C-g has been requested. If C-g is pressed 3
+ times, then quit anyway. If `debug-on-quit' is true, then it is
+ honored when the quit occurs after the third C-g. */
+ static int force_quit_count;
+
/* This routine is called at interrupt level in response to C-g.
It is called from the SIGINT handler or kbd_buffer_store_event.
*************** handle_interrupt ()
*** 11239,11246 ****
UNGCPRO;
}
else
! /* Else request quit when it's safe */
! Vquit_flag = Qt;
}
/* TODO: The longjmp in this call throws the NS event loop integration
off,
--- 11248,11266 ----
UNGCPRO;
}
else
! {
! /* Else request quit when it's safe */
! if (NILP (Vquit_flag))
! {
! force_quit_count = 0;
! }
! if (++force_quit_count == 3)
! {
! immediate_quit = 1;
! Vinhibit_quit = Qnil;
! }
! Vquit_flag = Qt;
! }
}
/* TODO: The longjmp in this call throws the NS event loop integration
off,
----8<----
This does indeed solve the problem for me. But I freely admit that I've
never done emacs development before and so something more may be
required or desired. Anyway, this is certain a start and I hope it helps.
Best,
-Jason
This bug report was last modified 13 years and 39 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.