From: jfa Date: Thu, 28 Sep 2006 08:18:51 +0000 (+0000) Subject: PAL10867: noexcepthandler option in GUI not working. Disable signals catching. X-Git-Tag: V3_2_3pre1~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ffab2d99a01de96d90d5bbfe5f9827c8c385b0bd;p=modules%2Fsmesh.git PAL10867: noexcepthandler option in GUI not working. Disable signals catching. --- diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 9ba8783a3..d0eeb8bc0 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -426,18 +426,23 @@ void SMESH_Gen_i::SetEmbeddedMode( CORBA::Boolean theMode ) myIsEmbeddedMode = theMode; if ( !myIsEmbeddedMode ) { - bool raiseFPE; + //PAL10867: disable signals catching with "noexcepthandler" option + char* envNoCatchSignals = getenv("NOT_INTERCEPT_SIGNALS"); + if (!envNoCatchSignals || !atoi(envNoCatchSignals)) + { + bool raiseFPE; #ifdef _DEBUG_ - raiseFPE = true; - char* envDisableFPE = getenv("DISABLE_FPE"); - if (envDisableFPE && atoi(envDisableFPE)) - raiseFPE = false; + raiseFPE = true; + char* envDisableFPE = getenv("DISABLE_FPE"); + if (envDisableFPE && atoi(envDisableFPE)) + raiseFPE = false; #else - raiseFPE = false; + raiseFPE = false; #endif - OSD::SetSignal( raiseFPE ); + OSD::SetSignal( raiseFPE ); + } + // else OSD::SetSignal() is called in GUI } - // else OSD::SetSignal() is called in GUI } //=============================================================================