summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
235173e)
Without this, a buggy native-code extension can loop forever, and Emacs
can't easily be persuaded to kill it.
import sys as SYS
import os as OS
import re as RE
import sys as SYS
import os as OS
import re as RE
import subprocess as SUB
import distutils.core as DC
import distutils.log as DL
import subprocess as SUB
import distutils.core as DC
import distutils.log as DL
+###--------------------------------------------------------------------------
+### Preliminaries.
+
+## Turn off Python's `SIGINT' handler. If we get stuck in a native-code loop
+## then ^C will just set a flag that will be noticed by the main interpreter
+## loop if we ever get to it again. And raising `SIGINT' is how Emacs `C-c
+## C-k' aborts a compilation, so this is really unsatisfactory.
+SIG.signal(SIG.SIGINT, SIG.SIG_DFL)
+
###--------------------------------------------------------------------------
### Compatibility hacks.
###--------------------------------------------------------------------------
### Compatibility hacks.