From 48a009c698af622d15fe9fd4a4d6a52cad33ef5f Mon Sep 17 00:00:00 2001 From: mainzelm Date: Fri, 6 Sep 2002 11:25:59 +0000 Subject: [PATCH] Create a fresh vector of handlers on startup. --- scsh/sighandlers.scm | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/scsh/sighandlers.scm b/scsh/sighandlers.scm index 46b9b33..4b52c21 100644 --- a/scsh/sighandlers.scm +++ b/scsh/sighandlers.scm @@ -94,9 +94,10 @@ (set-enabled-interrupts before) return))) - -(define *interrupt-handlers-vector* - (make-vector number-of-interrupts #t)) +(define *interrupt-handlers-vector*) + +(define (install-fresh-interrupt-handlers-vector!) + (set! *interrupt-handlers-vector* (make-vector number-of-interrupts #t))) (define (interrupt-handlers-vector) *interrupt-handlers-vector*) @@ -162,11 +163,7 @@ (interrupt-handler-ref int)) (define (with-scsh-sighandlers interactive? thunk) - (do ((int 0 (+ int 1))) - ((= int number-of-interrupts)) - (set-interrupt-handler - int - (lambda a #f))) + (install-fresh-interrupt-handlers-vector!) (do ((sig 32 (- sig 1))) ((< sig 0)) (let ((i (%signal->interrupt sig)))