Make the syslog subsystem resume correctly.
This commit is contained in:
parent
19ed629222
commit
2883063f65
|
@ -175,8 +175,12 @@
|
|||
(syslog-mask=? (syslog-channel-mask channel-1)
|
||||
(syslog-channel-mask channel-2))))
|
||||
|
||||
(define current-syslog-channel #f)
|
||||
(define current-syslog-channel-lock (make-lock))
|
||||
(define current-syslog-channel 'unitinialized)
|
||||
(define current-syslog-channel-lock 'unitinialized)
|
||||
|
||||
(define (initialize-syslog)
|
||||
(set! current-syslog-channel #f)
|
||||
(set! current-syslog-channel-lock (make-lock)))
|
||||
|
||||
(define open-syslog-channel make-syslog-channel)
|
||||
|
||||
|
@ -255,3 +259,25 @@
|
|||
(let-thread-fluid dynamic-syslog-channel
|
||||
(make-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
|
||||
(make-reinitializer initialize-syslog))
|
||||
|
|
Loading…
Reference in New Issue