mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
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:
parent
91fe0e20c7
commit
90a1e4b303
1 changed files with 4 additions and 1 deletions
|
@ -295,7 +295,10 @@ (define (call-with-sigint-handler thunk handler)
|
|||
(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))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue