]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
do not shutdown launcher server if it is remote
authorBernard Secher <bernard.secher@cea.fr>
Tue, 27 Nov 2018 15:12:36 +0000 (16:12 +0100)
committerBernard Secher <bernard.secher@cea.fr>
Thu, 28 Mar 2019 13:17:10 +0000 (14:17 +0100)
src/Launcher/SALOME_Launcher.cxx
src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx
src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx

index a67ab897c03a0e83ca890daaef0d13add2cc2cbc..c35db364d223ccf009d1704e48f1e0d117f3038c 100644 (file)
@@ -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();
index a6f1d9a5745c4b4224e4f815fae1ebe14bc4f089..65587093682de6ab27c2b156555821c170cd5fd5 100644 (file)
@@ -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)
     {
index 2a0ae9248175710b54c9bdb078be37871bb1bf22..ad6d7bb62022f9b2998f30f86656f562a8d9acd8 100644 (file)
@@ -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: