SEH Equivalent in Linux or How do I handle OS Signals (like SIGSERV) and yet keep continuing
- 阅读更多 关于 SEH Equivalent in Linux or How do I handle OS Signals (like SIGSERV) and yet keep continuing
问题 I am currently working on a Unit Testing framework where users can create Test Cases and register with the framework. I would also like to ensure that if any of the User Test Code causes a Crash, it should not Crash the entire framework but should be flagged as failed. To Make this work, I wrote up the following Code so that I can run the Users Code within the Sandbox function bool SandBox(void *(*fn)(void *),void *arg, void *rc) { #ifdef WIN32 __try { if (rc) rc = fn(arg); else fn(arg);