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.
This commit is contained in:
Ludovic Courtès 2013-05-14 23:52:13 +02:00
parent 91fe0e20c7
commit 90a1e4b303
1 changed files with 4 additions and 1 deletions

View File

@ -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))))