1

I've managed to write a timer that reliably causes keyboard input not to be accepted until I press Ctrl-G.

The issue is, I don't know what causes the timer to lock up, what the stack frame is when it's locked up, or how to unlock it.

  • (signal 'quit) resolves the issue but this isn't a reasonable fix.
  • Using gdb doesn't point to a function which is blocking input.
  • toggle-debug-on-quit doesn't give a useful stack trace.

In Python I can press Ctrl-C to get a stack trace of the code being executed. Why doesn't Emacs let me interrupt my timer's code with C-g?

ideasman42
  • 8,375
  • 1
  • 28
  • 105
  • What do you mean by "(signal 'quit) resolves the issue"? How/when can your code decide to call `(signal 'quit)`? – Stefan May 29 '19 at 18:11
  • 1
    timer code always runs with `inhibit-quit` bound to a non-nil value (so that it doesn't get accidentally aborted just because the user hit `C-g` at that moment for some completely unrelated reason (e.g. to get out of a minibuffer)). – Stefan May 29 '19 at 18:13
  • Have you tried sending SIGUSR2 to Emacs? –  May 30 '19 at 12:27

1 Answers1

1

Maybe toggle-debug-on-quit will help.

Toggle whether to enter Lisp debugger when C-g is pressed.

muffinmad
  • 2,250
  • 7
  • 11