Re: [AD] mzscheme bindings in svn |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2007-04-28, Jon Rafkind <workmin@xxxxxxxxxx> wrote:
> Oh wait I forgot. I did change one fundamental thing about Allegro. In
> src/x/xsystem.c I had to comment out the signal stuff because mzscheme
> uses signals for write-barriers with the garbage collector:
>
> static int _xwin_sysdrv_init(void)
> {
> char tmp[256];
>
> _unix_read_os_type();
> /*
> old_sig_abrt = signal(SIGABRT, _xwin_signal_handler);
> old_sig_fpe = signal(SIGFPE, _xwin_signal_handler);
> old_sig_ill = signal(SIGILL, _xwin_signal_handler);
> old_sig_segv = signal(SIGSEGV, _xwin_signal_handler);
> old_sig_term = signal(SIGTERM, _xwin_signal_handler);
> old_sig_int = signal(SIGINT, _xwin_signal_handler);
>
> #ifdef SIGQUIT
> old_sig_quit = signal(SIGQUIT, _xwin_signal_handler);
> #endif
> */
>
> Maybe we can wrap those with a
> if ( global_use_signals ){
> ...
> }
> or something?
That would be fine (but call it __al_xwin_dont_install_signal_handlers
or something). A dirtier solution would be to save the MzScheme signal
handlers before calling allegro_init(), then restore them immediately
afterwards. This would work with current and older versions of Allegro.
OTOH, which signals are MzScheme using? Surely not SIGABRT, SIGSEGV,
SIGTERM, SIGQUIT?
Peter