[Ecls-list] Repl loop running in another thread and non blocking?

Juan Jose Garcia-Ripoll juanjose.garciaripoll at gmail.com
Fri Nov 2 14:01:12 UTC 2012


On Fri, Nov 2, 2012 at 2:16 PM, Peter Enerccio <enerccio at gmail.com> wrote:

> Right now, ecl when its booted makes a thread that waits on read, but does
> not accept any input, however it will once I use SIGINTR or some error
> happens. Now, what I would want it to not wait and block on read, but
> instead act as repl, so while my program can do whatever it wants on its
> own, it can be debugged on the fly.


This is a misunderstanding. The background thread is _not_ a repl. It
exists to receive messages from threads that god serious signals, such as
SIGSEGV, SIGBUS, etc, from which they cannot recover. Since error handlers
cannot be executed from those threads, the background thread spawns new
subprocesses to handle those errors. It is not waiting on read on the
terminal, but on a pipe that gets those ugly signals. Unfortunately, due to
POSIX constraints, there is no way we can get away without it and it cannot
be customized for your purposes -- at most you can interfere with the error
threads it creates by associating different handlers to the signal codes
using (ext:set-signal-handler code handler)

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/20121102/b594d36e/attachment.html>


More information about the ecl-devel mailing list