mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
workers: Display backtrace in pre-unwind handler.
* guix/workers.scm (worker-thunk): Add (const #f) as the 'catch' handler, and move previous handler as pre-unwind handler. Protect against 'make-stack' returning #f.
This commit is contained in:
parent
19fd7229bc
commit
d5ce7bcfa2
1 changed files with 3 additions and 1 deletions
|
@ -75,12 +75,14 @@ (define (loop)
|
|||
;; Release MUTEX while executing PROC.
|
||||
(without-mutex mutex
|
||||
(catch #t proc
|
||||
(const #f)
|
||||
(lambda (key . args)
|
||||
;; XXX: In Guile 2.0 ports are not thread-safe, so this could
|
||||
;; crash (Guile 2.2 is fine).
|
||||
(display-backtrace (make-stack #t) (current-error-port))
|
||||
(print-exception (current-error-port)
|
||||
(stack-ref (make-stack #t) 0)
|
||||
(and=> (make-stack #t)
|
||||
(cut stack-ref <> 0))
|
||||
key args))))))
|
||||
(loop))
|
||||
|
||||
|
|
Loading…
Reference in a new issue