[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/04: build: Arrange so temporary .go files are deleted upon SIGINT.
From: |
Ludovic Courtès |
Subject: |
01/04: build: Arrange so temporary .go files are deleted upon SIGINT. |
Date: |
Wed, 12 Oct 2016 21:36:45 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit 402bb3b9f7eaaa66f2652fda2d9e0d2e34cf59f8
Author: Ludovic Courtès <address@hidden>
Date: Wed Oct 12 14:55:32 2016 +0200
build: Arrange so temporary .go files are deleted upon SIGINT.
* build-aux/compile-all.scm: Install SIGINT handler.
---
build-aux/compile-all.scm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/build-aux/compile-all.scm b/build-aux/compile-all.scm
index 46b3817..6ce4040 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)))