summaryrefslogtreecommitdiff
path: root/module/scripts
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2014-09-30 03:50:47 -0400
committerMark H Weaver <mhw@netris.org>2014-09-30 03:50:47 -0400
commit856d318a9f543d8a61fcf61caae7d07102586802 (patch)
tree10bd99500c027bbd472253f6cc34f8b1b516d4a1 /module/scripts
parentf7582f9807d9a10fba86f54c4aeaa7444c51a315 (diff)
parent3157d455039f137ca5dfa8b9fbc4a3404ce00606 (diff)
downloadguile-856d318a9f543d8a61fcf61caae7d07102586802.tar.gz
Merge branch 'stable-2.0'
Conflicts: benchmark-suite/benchmarks/ports.bm libguile/async.h libguile/bytevectors.c libguile/foreign.c libguile/gsubr.c libguile/srfi-1.c libguile/vm-engine.h libguile/vm-i-scheme.c module/Makefile.am module/language/tree-il/analyze.scm module/language/tree-il/peval.scm module/scripts/compile.scm module/scripts/disassemble.scm test-suite/tests/asm-to-bytecode.test test-suite/tests/peval.test test-suite/tests/rdelim.test
Diffstat (limited to 'module/scripts')
-rw-r--r--module/scripts/compile.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/module/scripts/compile.scm b/module/scripts/compile.scm
index ab2c456d4..5b644c3d4 100644
--- a/module/scripts/compile.scm
+++ b/module/scripts/compile.scm
@@ -1,6 +1,6 @@
;;; Compile --- Command-line Guile Scheme compiler -*- coding: iso-8859-1 -*-
-;; Copyright 2005,2008,2009,2010,2011,2013 Free Software Foundation, Inc.
+;; Copyright 2005, 2008-2011, 2013, 2014 Free Software Foundation, Inc.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
@@ -176,6 +176,14 @@ Report bugs to <~A>.~%"
(fail "`-o' option can only be specified "
"when compiling a single file"))
+ ;; Install a SIGINT handler. As a side effect, this gives unwind
+ ;; handlers an opportunity to run upon SIGINT; this includes that of
+ ;; 'call-with-output-file/atomic', called by 'compile-file', which
+ ;; removes the temporary output file.
+ (sigaction SIGINT
+ (lambda args
+ (fail "interrupted by the user")))
+
(for-each (lambda (file)
(format #t "wrote `~A'\n"
(with-fluids ((*current-warning-prefix* ""))