[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Handling asynchronous interrupts in a command-line interpreter.
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 26 Sep 2000 11:16:48 -0300
> One issue with this is that the control-C can come along at *any* time.
The stand-alone interpreter lua.c has similar problems. What we do is that
the singal handler only sets a (debug) hook; when the hook is called, then
it produces an error that stops execution. There is one problem with that:
the virtual machine does not change its line hook in the middle of a function,
so you have to rely on the call hook: If your piece of code does no calls,
it will not stop.
-- Roberto