X-Git-Url: https://git.distorted.org.uk/~mdw/cfd/blobdiff_plain/235173edfc704d78de54f6d8d58b9bd5d8910e74..e638c0a3b3417bd5a2fb32cf4f61c6a42dab051f:/mdwsetup.py diff --git a/mdwsetup.py b/mdwsetup.py index 55120fb..876297e 100644 --- a/mdwsetup.py +++ b/mdwsetup.py @@ -28,12 +28,22 @@ from __future__ import with_statement import sys as SYS import os as OS import re as RE +import signal as SIG 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. def with_metaclass(meta, *supers):