Default sighandler for SIG/INT depends on whether we run interactive or not.
This commit is contained in:
parent
145ddac9cb
commit
b3447ad964
|
@ -332,7 +332,7 @@
|
|||
|
||||
(define-foreign %%get-int-handlers (get_int_handlers) desc)
|
||||
|
||||
(define (%install-scsh-handlers)
|
||||
(define (%install-scsh-handlers interactive?)
|
||||
(do ((int 0 (+ int 1)))
|
||||
((= int number-of-interrupts))
|
||||
(set-interrupt-handler
|
||||
|
@ -342,7 +342,7 @@
|
|||
((< sig 0))
|
||||
(let ((i (%signal->interrupt sig)))
|
||||
(if (not (or (= i -1)
|
||||
(= sig signal/int) ; Leave ^c and
|
||||
; (= sig signal/int) ; Leave ^c and
|
||||
(= sig signal/alrm))) ; alarm handlers alone.
|
||||
(set-interrupt-handler
|
||||
i
|
||||
|
@ -353,6 +353,9 @@
|
|||
(error "sighandler did not find scheduler-initial-thread, but"
|
||||
scheduler-initial-thread))
|
||||
|
||||
;; Note: this will prevent any other system to work, since it pushes
|
||||
;; a new command level !
|
||||
(if interactive?
|
||||
(set-interrupt-handler interrupt/keyboard
|
||||
(lambda stuff
|
||||
((structure-ref threads-internal schedule-event)
|
||||
|
@ -360,7 +363,7 @@
|
|||
(enum
|
||||
(structure-ref threads-internal event-type)
|
||||
interrupt)
|
||||
(enum interrupt keyboard))))))
|
||||
(enum interrupt keyboard)))))))
|
||||
|
||||
;;; I am ashamed to say the 33 below is completely bogus.
|
||||
;;; What we want is a value that is 1 + max interrupt value.
|
||||
|
|
|
@ -47,6 +47,8 @@
|
|||
(init-low-interrupt)
|
||||
(install-event-handlers!)
|
||||
(install-env)
|
||||
(%install-scsh-handlers #f)
|
||||
(install-autoreaping)
|
||||
(init-scsh-vars #f) ; Do it quietly.
|
||||
(start args))
|
||||
filename))
|
||||
|
|
|
@ -240,7 +240,7 @@
|
|||
(spawn forever-sleeping-thread)
|
||||
(init-low-interrupt)
|
||||
(install-event-handlers!)
|
||||
(%install-scsh-handlers)
|
||||
(%install-scsh-handlers (not term-switch))
|
||||
(install-autoreaping)
|
||||
(install-env)
|
||||
|
||||
|
|
Loading…
Reference in New Issue