Catch exn instead of exn:fail in daemon, to prevent accidental daemon exits.

This commit is contained in:
Tony Garnock-Jones 2014-12-04 12:20:23 -05:00
parent 0418e96196
commit db021c9551

View File

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