Bug fix for WITH-SYSLOG-DESTINATION:

Properly take old syslog channel into account.
This commit is contained in:
sperber 2001-07-11 11:21:18 +00:00
parent 75fa4c1852
commit a4a437484d
1 changed files with 20 additions and 1 deletions

View File

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