diff --git a/scsh/sighandlers.scm b/scsh/sighandlers.scm index 8877866..f884682 100644 --- a/scsh/sighandlers.scm +++ b/scsh/sighandlers.scm @@ -210,12 +210,15 @@ (vector-set! interrupt-handlers i (vector-ref default-int-handler-vec i)))))) +;;; I am ashamed to say the 33 below is completely bogus. +;;; What we want is a value that is 1 + max interrupt value. + (define int->sig-vec - (let ((v (make-vector 32 #f))) + (let ((v (make-vector 33 #f))) (do ((sig 32 (- sig 1))) ((< sig 0)) (let ((i (%signal->interrupt sig))) - (if (not (= i -1)) (vector-set! v sig i)))) + (if (not (= i -1)) (vector-set! v i sig)))) v)) (define (int->signal i) (and (<= 0 i 32) (vector-ref int->sig-vec i)))