aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-10-12 14:55:32 +0200
committerLudovic Courtès <ludo@gnu.org>2016-10-12 23:35:41 +0200
commit402bb3b9f7eaaa66f2652fda2d9e0d2e34cf59f8 (patch)
treee37c39bce7b047b36b8c233b35284ed94443a4e7
parenteb419bc9fe46358f750c5f0aed87a9b98a93609e (diff)
downloadgnu-guix-402bb3b9f7eaaa66f2652fda2d9e0d2e34cf59f8.tar
gnu-guix-402bb3b9f7eaaa66f2652fda2d9e0d2e34cf59f8.tar.gz
build: Arrange so temporary .go files are deleted upon SIGINT.
* build-aux/compile-all.scm: Install SIGINT handler.
-rw-r--r--build-aux/compile-all.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/build-aux/compile-all.scm b/build-aux/compile-all.scm
index 46b381723b..6ce4040887 100644
--- a/build-aux/compile-all.scm
+++ b/build-aux/compile-all.scm
@@ -76,6 +76,12 @@
#:output-file go
#:opts `(#:warnings ,warnings)))))))
+;; Install a SIGINT handler to give unwind handlers in 'compile-file' an
+;; opportunity to run upon SIGINT and to remove temporary output files.
+(sigaction SIGINT
+ (lambda args
+ (exit 1)))
+
(match (command-line)
((_ . files)
(let ((files (filter file-needs-compilation? files)))