summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-05-12 14:52:41 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2015-05-12 14:52:41 -0700
commit095ff1cb4ab3923ac31fb269df8e390438e492b4 (patch)
tree5fe648dd9250dd31dd2dfe8e9fb66562eb0fa3b2 /bin
parentc44db0133f821a3294dfbbbce40a7254b3e1ed3c (diff)
downloadspack-095ff1cb4ab3923ac31fb269df8e390438e492b4.tar.gz
spack-095ff1cb4ab3923ac31fb269df8e390438e492b4.tar.bz2
spack-095ff1cb4ab3923ac31fb269df8e390438e492b4.tar.xz
spack-095ff1cb4ab3923ac31fb269df8e390438e492b4.zip
Add debug handler to print a stacktrace on Ctrl-C in debug mode.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/spack4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/spack b/bin/spack
index 013acf4db8..7dd3dbabbb 100755
--- a/bin/spack
+++ b/bin/spack
@@ -93,6 +93,10 @@ def main():
tty.set_debug(args.debug)
spack.debug = args.debug
+ if spack.debug:
+ import spack.util.debug as debug
+ debug.register_interrupt_handler()
+
spack.spack_working_dir = working_dir
if args.mock:
from spack.packages import PackageDB