diff --git a/scsh/syslog.scm b/scsh/syslog.scm index e776b29..990ee94 100644 --- a/scsh/syslog.scm +++ b/scsh/syslog.scm @@ -257,9 +257,28 @@ (define (with-syslog-destination ident options facility mask thunk) (let-thread-fluid dynamic-syslog-channel - (make-syslog-channel ident options facility mask) + (change-syslog-channel + (thread-fluid dynamic-syslog-channel) + ident options facility mask) thunk)) +;---------------- +; A record type whose only purpose is to run some code when we start up an +; image. + +(define-record-type reinitializer :reinitializer + (make-reinitializer thunk) + reinitializer? + (thunk reinitializer-thunk)) + +(define-record-discloser :reinitializer + (lambda (r) + (list 'reinitializer (reinitializer-thunk r)))) + +(define-record-resumer :reinitializer + (lambda (r) + ((reinitializer-thunk r)))) + (initialize-syslog) (define syslog-reinitializer