From 90a1e4b3033e4a17a4b05f51f046a0eaa697c95b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 14 May 2013 23:52:13 +0200 Subject: package: Always clear the SIGINT handler. * guix/scripts/package.scm (call-with-sigint-handler): Wrap THUNK in `dynamic-wind' so that the SIGINT handler is always cleared. --- guix/scripts/package.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 094d348ac9..aeeeab307c 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -295,7 +295,10 @@ return its return value." (lambda (signum) (sigaction SIGINT SIG_DFL) (abort-to-prompt %sigint-prompt signum))) - (thunk)) + (dynamic-wind + (const #t) + thunk + (cut sigaction SIGINT SIG_DFL))) (lambda (k signum) (handler signum)))) -- cgit v1.2.3