Re: [Cppunit-devel] Signal handling in Linux
Brought to you by:
blep
From: Baptiste L. <gai...@fr...> - 2002-03-26 20:42:43
|
VC++ provides _set_se_translator() do translate such fault into C++ exception (a life saver when testing multithreaded application). I don't know if g++ provides a similar functionnality... Baptiste. ----- Original Message ----- From: "Robert Wenner" <ro...@po...> To: <cpp...@li...> Sent: Thursday, March 21, 2002 4:56 PM Subject: [Cppunit-devel] Signal handling in Linux Hi, I expect some of my tests to access a null pointer and thus to raise a signal (SIGSGV). I would like to thow an Exception on arrival of any signal to avoid it terminating the program and instead be recorded as a failed or succeded test run. The C++ standard does not allow any C++ features being used in signal handler functions, especially no exceptions. I really do not like using a global variable (or singleton) which I check at the end of the test. Can anybody please point me to a more elegant solution? Is there perhaps some kind of compiler setting to map signals to exceptions by default (I use g++)? Thanks in advance Robert _______________________________________________ Cppunit-devel mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppunit-devel |