Catch exn instead of exn:fail in daemon, to prevent accidental daemon exits.
This commit is contained in:
parent
0418e96196
commit
db021c9551
|
@ -8,7 +8,10 @@
|
||||||
(define (daemonize-thunk name boot-thunk)
|
(define (daemonize-thunk name boot-thunk)
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let reboot ()
|
(let reboot ()
|
||||||
(with-handlers* ((exn:fail? (lambda (e)
|
;; We would catch exn:fail? here, but exn:pretty in the web
|
||||||
|
;; server is a subtype of exn, not of exn:fail, and that causes
|
||||||
|
;; spurious permanent daemon exits.
|
||||||
|
(with-handlers* ((exn? (lambda (e)
|
||||||
(log-error "*** DAEMON CRASHED: ~a ***\n~a"
|
(log-error "*** DAEMON CRASHED: ~a ***\n~a"
|
||||||
name
|
name
|
||||||
(exn->string e))
|
(exn->string e))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user