Salome HOME
Fix typos by Kunda
[modules/kernel.git] / src / Container / SALOME_ContainerManager.cxx
index 676adc8e34b03a7cc0252c8db70bb569ca399233..989ae8dbb0aa43de087445423753ed46446b3046 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2017  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -726,7 +726,7 @@ bool isPythonContainer(const char* ContainerName)
  *  ssh user@machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir \
  *                   SALOME_Container containerName &"
 
- *  - where user is ommited if not specified in CatalogResources,
+ *  - where user is omitted if not specified in CatalogResources,
  *  - where distant path is always relative to user@machine $HOME, and
  *    equal to $APPLI if not specified in CatalogResources,
  *  - where hostNS is the hostname of CORBA naming server (set by scripts to
@@ -757,7 +757,7 @@ SALOME_ContainerManager::BuildCommandToLaunchRemoteContainer(const std::string&
         nbproc = params.nb_proc;
     }
 
-    // "ssh -l user machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir \
+    // "ssh -l user machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir
     //  SALOME_Container containerName &"
     command = getCommandToRunRemoteProcess(resInfo.Protocol, resInfo.HostName, resInfo.UserName);
 
@@ -1045,6 +1045,9 @@ std::string SALOME_ContainerManager::BuildTemporaryFileName()
 {
   //build more complex file name to support multiple salome session
   std::string aFileName = Kernel_Utils::GetTmpFileName();
+  std::ostringstream str_pid;
+  str_pid << ::getpid();
+  aFileName = aFileName + "-" + str_pid.str();
 #ifndef WIN32
   aFileName += ".sh";
 #else
@@ -1196,7 +1199,7 @@ std::string SALOME_ContainerManager::GetMPIZeroNode(const std::string machine, c
   std::string command;
   std::string tmpFile = BuildTemporaryFileName();
   const ParserResourcesType resInfo(_resManager->GetResourceDefinition(machine));
-  
+
   if(resInfo.Protocol == sh)
   {
     return resInfo.HostName;
@@ -1514,7 +1517,7 @@ SALOME_ContainerManager::StartPaCOPPContainer(const Engines::ContainerParameters
     }
     catch (...)
     {
-      INFOS("[StarPaCOPPContainer] Exception catched from proxy Shutdown...");
+      INFOS("[StarPaCOPPContainer] Exception caught from proxy Shutdown...");
     }
     return ret;
   }
@@ -2055,4 +2058,3 @@ SALOME_ContainerManager::LaunchPaCONodeContainer(const std::string& command,
   return false;
 }
 #endif
-