Update of /cvsroot/scsh/scsh-0.6/scsh
In directory usw-pr-cvs1:/tmp/cvs-serv3010
Modified Files:
syslog.scm
Log Message:
Make the syslog subsystem resume correctly.
Index: syslog.scm
===================================================================
RCS file: /cvsroot/scsh/scsh-0.6/scsh/syslog.scm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** syslog.scm 2001/06/20 07:48:03 1.3
--- syslog.scm 2001/06/22 15:50:10 1.4
***************
*** 176,182 ****
(syslog-channel-mask channel-2))))
! (define current-syslog-channel #f)
! (define current-syslog-channel-lock (make-lock))
(define open-syslog-channel make-syslog-channel)
--- 176,186 ----
(syslog-channel-mask channel-2))))
! (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)
***************
*** 256,257 ****
--- 260,283 ----
(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))
|