~ruther/guix-local

90a1e4b3033e4a17a4b05f51f046a0eaa697c95b — Ludovic Courtès 13 years ago 91fe0e2
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.
1 files changed, 4 insertions(+), 1 deletions(-)

M guix/scripts/package.scm
M guix/scripts/package.scm => guix/scripts/package.scm +4 -1
@@ 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))))