I think you can use any of C++ exceptions, explicit returns, or setlongjmp(). setlongjmp() doesn't work well with C++ destructors. The interpreter loop just has to check for a flag set by the signal handler and then pop back to the interactive loop.
I noticed that the Lua parser uses setlongjmp() when compiled as C, but C++ exceptions when compiled as C++.
I think you can use any of C++ exceptions, explicit returns, or setlongjmp(). setlongjmp() doesn't work well with C++ destructors. The interpreter loop just has to check for a flag set by the signal handler and then pop back to the interactive loop.
I noticed that the Lua parser uses setlongjmp() when compiled as C, but C++ exceptions when compiled as C++.