Salome HOME
Merge branch 'omu/launcher_evol'
[modules/kernel.git] / src / Launcher / Launcher_Job_SALOME.cxx
index 75941e77bfbe56fc01c08fff884eae830da48ec0..ee2812c1b6f5cae12d61d3d316d198bb928ee3a9 100644 (file)
@@ -31,6 +31,8 @@
 #define _chmod chmod
 #endif
 
+#include <sstream>
+
 Launcher::Job_SALOME::Job_SALOME() {}
 
 Launcher::Job_SALOME::~Job_SALOME() {}
@@ -63,8 +65,9 @@ Launcher::Job_SALOME::buildSalomeScript(Batch::Parametre params)
 {
   // parameters
   std::string work_directory = params[Batch::WORKDIR].str();
-
-  std::string launch_script = Kernel_Utils::GetTmpDir() + "runSalome_" + _job_file_name + "_" + _launch_date + ".sh";
+  std::ostringstream str_pid;
+  str_pid << ::getpid();
+  std::string launch_script = Kernel_Utils::GetTmpDir() + "runSalome_" + _job_file_name + "_" + _launch_date + "-" + str_pid.str() + ".sh";
   std::ofstream launch_script_stream;
   launch_script_stream.open(launch_script.c_str(),
                             std::ofstream::out