lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>Is there no way of doing things better than this? It hardly seems worth
>catching SIGINT at all if I can't catch it when blocked on I/O...which is
>the reason I most often want to escape from e.g. command line utils

We don't know a better way. I don't think you can longjmp inside a signal
handler but I haven't checked this. Even if we can, we'd have to call setjmp 
inside the Lua core and longjmp to it from lua.c, something that's not polite,
given that lua.c is a simple client, not a core program. Unless we add signal
handling to the Lua core, which I think we'll resist because it's a corner of
ANSI C and also because we'd probably have to setjmp everytime the Lua core
called a C function, and this may be expensive.

But perhaps I'm missing something simpler.
--lhf