>>>>> "Ludovic" == Ludovic Courtès <l...@gnu.org> writes:
Ludovic> So do I get it right that it’s GDB that does signal(SIGINT, ...), and Ludovic> its handler just calls PyOS_InterruptOccurred (or so) if Python code Ludovic> happens to be running? Yeah. >> One approach for multiple extension languages might be to notice when >> switching languages and move the bit. However I didn't see any way to >> do this in the Guile API. In Python it can be accomplished with >> PyErr_SetInterrupt and PyOS_InterruptOccurred. Ludovic> Would it work, upon SIGINT, to do something like: Ludovic> (system-async-mark (lambda () Ludovic> (throw 'system-error ... EINTR))) Ludovic> That would eventually raise an exception in Scheme code. According to the Guile docs one must use scm_sigaction, since scm_system_async_mark is not async-signal-safe. However scm_sigaction takes over the signal. I don't think that will work ok. Also this idea doesn't address how it would interact with the gdb core or with Python. Tom