This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Howto disable guiles signal handlers for debugging?


> Date: Fri, 12 May 2000 10:51:20 +0200 (CEST)
> From: Richard Guenther <richard.guenther@student.uni-tuebingen.de>

> I use guile for scripting a C application - but unfortunately the
> guile provided signal handlers for SIGSEGV and friends are not
> very helpful. Is ther any way to instruct guile _not_ to install
> those handlers? (apart from re-setting them inside gh_enter())

The interactive repl installs handlers for SIGINT, SIGFPE, SIGBUS and
SIGSEGV.  The non-interactive repl (used when running a script with
-s) doesn't install any handlers.

The original handlers can be reset by calling restore-signals from
Scheme or scm_restore_signals from C or handlers can be restored one
at a time using (sigaction SIGINT #f) etc.

To avoid getting the new handlers installed in the first place I think
you would need to use a different interactive repl.  e.g., try copying
top-repl from ice-9/boot-9.scm to ~/.guile and remove the signals you
don't want to be handled.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]