From: Bernard Secher Date: Tue, 27 Nov 2018 15:12:36 +0000 (+0100) Subject: do not shutdown launcher server if it is remote X-Git-Tag: EMC2P_V1_1_0~15^2~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=528f1276df50cb518a7c03382bf642874e5e7c72;p=modules%2Fkernel.git do not shutdown launcher server if it is remote --- diff --git a/src/Launcher/SALOME_Launcher.cxx b/src/Launcher/SALOME_Launcher.cxx index a67ab897c..c35db364d 100644 --- a/src/Launcher/SALOME_Launcher.cxx +++ b/src/Launcher/SALOME_Launcher.cxx @@ -480,7 +480,6 @@ SALOME_Launcher::testBatch(const Engines::ResourceParameters& params) void SALOME_Launcher::Shutdown() { MESSAGE("Shutdown"); - std::cout << "Shutdown Launcher" << std::endl; _NS->Destroy_Name(_LauncherNameInNS); _ContManager->Shutdown(); _ResManager->Shutdown(); diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx index a6f1d9a57..655870936 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx @@ -420,7 +420,7 @@ Engines::ResourcesManager_ptr SALOME_LifeCycleCORBA::getResourcesManager() */ //============================================================================= -void SALOME_LifeCycleCORBA::shutdownServers() +void SALOME_LifeCycleCORBA::shutdownServers(bool shutdownLauncher) { // get each Container from NamingService => shutdown it // (the order is inverse to the order of servers initialization) @@ -513,10 +513,12 @@ void SALOME_LifeCycleCORBA::shutdownServers() // 5) SalomeLauncher try { - CORBA::Object_var objSL = _NS->Resolve("/SalomeLauncher"); - Engines::SalomeLauncher_var launcher = Engines::SalomeLauncher::_narrow(objSL); - if (!CORBA::is_nil(launcher) && (pid != launcher->getPID())) - launcher->Shutdown(); + if(shutdownLauncher){ + CORBA::Object_var objSL = _NS->Resolve("/SalomeLauncher"); + Engines::SalomeLauncher_var launcher = Engines::SalomeLauncher::_narrow(objSL); + if (!CORBA::is_nil(launcher) && (pid != launcher->getPID())) + launcher->Shutdown(); + } } catch(const CORBA::Exception& e) { diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx index 2a0ae9248..ad6d7bb62 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx @@ -99,7 +99,7 @@ public: CORBA::ORB_ptr orb(); void copyFile(const char* hostSrc, const char* fileSrc, const char* hostDest, const char* fileDest); - void shutdownServers(); + void shutdownServers(bool shutdownLauncher=true); static void killOmniNames(); protected: