[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[plt-scheme] mred control-c
Hello,
Control-c (linux plt 200) causes mzscheme to break out of what's currently
being executed and return to the mzscheme user prompt.
Control-c causes mred to exit.
How can we make mred -z behave like mzscheme?
I copied the mzscheme SIGINT handling code into an extension and
loaded that into mred. mred reports "user break" when control-c
is hit, but still exits. Do I needed to catch exn:break too and
do something with that to prevent mred from exiting?
static void user_break_hit(int ignore)
{
scheme_break_thread(NULL);
scheme_signal_received();
# ifdef SIGSET_NEEDS_REINSTALL
MZ_SIGSET(SIGINT, user_break_hit);
# endif
# ifdef MZ_PRECISE_GC
/* Restore variable stack. */
GC_variable_stack = (void **)__gc_var_stack__[0];
# endif
}
signal(SIGINT, user_break_hit);
Thanks,
Ron Stanonik
stanonik@cogsci.ucsd.edu