The discussion of 3.9.0.1 Interrupt Handlers in the Scsh manual suggests
to me that when the scshvm receives e.g. a TSTP signal, it delivers the
corresponding interrupt to the running Scheme code that may choose to
block or handle it. Concretely, I would have thought that the script
below reads and prints a Scheme datum before it may yield to suspension.
-- It doesn't (as of scsh-0.6.2 / Linux kernel 2.4.10). So what's the
right way to protect code from catchable Unix signals?
rthappe
#!/tmp/bin/scsh \
-o low-interrupt -s
!#
; the struct LOW-INTERRUPT serves the proc REMOVE-INTERRUPT
(with-enabled-interrupts
(remove-interrupt interrupt/tstp (enabled-interrupts))
(display (read))
(newline))
|