From: jfa Date: Thu, 28 Sep 2006 08:17:30 +0000 (+0000) Subject: PAL10867: noexcepthandler option in GUI not working. Disable signals catching. X-Git-Tag: V3_2_3pre1~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4bb89dd0900869f021f72444e0516ff7bc8c8c49;p=modules%2Fgui.git PAL10867: noexcepthandler option in GUI not working. Disable signals catching. --- diff --git a/src/SalomeApp/SalomeApp_ExceptionHandler.cxx b/src/SalomeApp/SalomeApp_ExceptionHandler.cxx index 81cd56b04..d030d3c37 100644 --- a/src/SalomeApp/SalomeApp_ExceptionHandler.cxx +++ b/src/SalomeApp/SalomeApp_ExceptionHandler.cxx @@ -36,7 +36,14 @@ SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal ) : SUIT_ExceptionHandler() { - OSD::SetSignal( floatSignal ); + // JFA 2006-09-28: PAL10867: suppress signal catching, + // if environment variable DISABLE_SIGNALS_CATCHING is set to 1. + // Commonly this is used with "noexcepthandler" option. + char* envNoCatchSignals = getenv("NOT_INTERCEPT_SIGNALS"); + if (!envNoCatchSignals || !atoi(envNoCatchSignals)) + { + OSD::SetSignal( floatSignal ); + } } /*!Try to call SUIT_ExceptionHandler::internalHandle(o, e), catch if failure.*/ @@ -104,5 +111,6 @@ extern "C" SALOMEAPP_EXPORT SUIT_ExceptionHandler* getExceptionHandler() #else raiseFPE = false; #endif + return new SalomeApp_ExceptionHandler( raiseFPE ); }