Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Good tip, thanks!

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++.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: