lua-users home
lua-l archive

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


> The problem with catching these signals is that you cannot simply resume the
> process upon receipt (e.g. with a longjmp). Even excluding threads, the
> application could've been in the middle of a malloc call when the signal
> fired, with inconsistent state. Likewise with the Lua VM. The application
> could easily crash; or worse, it crashes so rarely that it's never caught in
> testing.

Both lua.c and my lalarm library try to handle signals so that the VM can
continue and abort when it is safe to do so. I think there are other, more
complete libraries for Lua that handle signals, such as lua-signal:
	https://github.com/LuaDist/lua-signal

See also http://lua-users.org/lists/lua-l/2012-12/msg00789.html .