From: Chris Hanson Date: Tue, 15 Oct 1991 18:01:55 +0000 (+0000) Subject: Modified by Max Hailperin to support Schematik-style X-Git-Tag: 20090517-FFI~10150 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a2130ecea0a8eb4b33008f48c5485e5ed40bf339;p=mit-scheme.git Modified by Max Hailperin to support Schematik-style interrupts if the environment variable USE_SCHEMATIK_STYLE_INTERRUPTS is defined. What this means is that the following signals are redefined to generate the corresponding keyboard interrupt (to avoid the unreliable behavior of the the interactive interrupt handler): signal keyboard interrupt ----- ------------------ SIGIOT control-x SIGQUIT control-u SIGHUP control-b --- diff --git a/v7/src/microcode/uxsig.c b/v7/src/microcode/uxsig.c index 26a6b6259..8d310b66e 100644 --- a/v7/src/microcode/uxsig.c +++ b/v7/src/microcode/uxsig.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxsig.c,v 1.16 1991/08/31 03:59:11 arthur Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxsig.c,v 1.17 1991/10/15 18:01:55 cph Exp $ Copyright (c) 1990-91 Massachusetts Institute of Technology @@ -416,6 +416,21 @@ DEFUN_STD_HANDLER (sighnd_control_g, tty_set_next_interrupt_char (CONTROL_G_INTERRUPT_CHAR); }) +DEFUN_STD_HANDLER (sighnd_control_u, + { + tty_set_next_interrupt_char (CONTROL_U_INTERRUPT_CHAR); + }) + +DEFUN_STD_HANDLER (sighnd_control_x, + { + tty_set_next_interrupt_char (CONTROL_X_INTERRUPT_CHAR); + }) + +DEFUN_STD_HANDLER (sighnd_control_b, + { + tty_set_next_interrupt_char (CONTROL_B_INTERRUPT_CHAR); + }) + static void EXFUN (interactive_interrupt_handler, (struct FULL_SIGCONTEXT * scp)); @@ -634,15 +649,24 @@ DEFUN_VOID (UX_initialize_signals) bind_handler (SIGPIPE, SIG_IGN); if ((isatty (STDIN_FILENO)) || option_emacs_subprocess) { - if (!option_emacs_subprocess) + if (getenv ("USE_SCHEMATIK_STYLE_INTERRUPTS")) + bind_handler (SIGHUP, sighnd_control_b); + else if (!option_emacs_subprocess) bind_handler (SIGHUP, sighnd_save_then_terminate); - bind_handler (SIGQUIT, sighnd_interactive); + if (getenv ("USE_SCHEMATIK_STYLE_INTERRUPTS")) + bind_handler (SIGQUIT, sighnd_control_u); + else + bind_handler (SIGQUIT, sighnd_interactive); bind_handler (SIGPWR, sighnd_save_then_terminate); bind_handler (SIGTSTP, sighnd_stop); bind_handler (SIGILL, sighnd_hardware_trap); bind_handler (SIGTRAP, sighnd_hardware_trap); bind_handler (SIGBUS, sighnd_hardware_trap); bind_handler (SIGSEGV, sighnd_hardware_trap); + if (getenv ("USE_SCHEMATIK_STYLE_INTERRUPTS")) + bind_handler (SIGIOT, sighnd_control_x); + else + bind_handler (SIGIOT, sighnd_software_trap); bind_handler (SIGIOT, sighnd_software_trap); bind_handler (SIGEMT, sighnd_software_trap); bind_handler (SIGSYS, sighnd_software_trap);