[Ecls-list] Ecl does not react on SIGINT on Linux

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Mon Mar 8 10:40:34 UTC 2010


On Mon, Mar 8, 2010 at 11:27 AM, Tobias C. Rittweiler <tcr at freebits.de>wrote:

> In what dynamic context is TERMINAL-INTERRUPT executed? From what I'm
> seeing (or rather not seeing :-)), it seems to be executed in an empty
> context?
>

A SIGINT in a multithreaded program can not be directed at a given thread.
The thread that receives it is randomly chosen by the operating system.
Instead of letting this happen, the signal servicing thread is polling all
asynchronous interrupts, such as SIGINT (and maybe in a near future others,
SIGSTOP, SIGTTY, etc) and creating threads that dispatch those interrupts.

But those newly created threads have their own context. They have access to
the list of threads, to what is being executed, and to the global and
sometimes local bindings of those threads, using the tools from the
debugger. However the logic of what to do next is not universal: it depends
totally on the user!

One possible choice is to kill or interrupt the only thread which is not the
signal servicing one. There are other possibilities, though.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100308/e51493ca/attachment.html>


More information about the ecl-devel mailing list