diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-05-14 23:52:13 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-05-14 23:52:13 +0200 |
commit | 90a1e4b3033e4a17a4b05f51f046a0eaa697c95b (patch) | |
tree | 246ef1f14386c646c85719e5d0f5f913823b52f9 /guix | |
parent | 91fe0e20c7da2b706a1ac0e7b75235b6c1e6ed0a (diff) | |
download | gnu-guix-90a1e4b3033e4a17a4b05f51f046a0eaa697c95b.tar gnu-guix-90a1e4b3033e4a17a4b05f51f046a0eaa697c95b.tar.gz |
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.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/scripts/package.scm | 5 |
1 files changed, 4 insertions, 1 deletions
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)))) |