From 402bb3b9f7eaaa66f2652fda2d9e0d2e34cf59f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 12 Oct 2016 14:55:32 +0200 Subject: 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(+) (limited to 'build-aux/compile-all.scm') 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))) -- cgit v1.2.3