Salome HOME
Move XML persistence functions from SALOME_Launcher class to a dedicated class Launch...
[modules/kernel.git] / src / Launcher / Launcher_Job_Command.cxx
index f325898ed5b2bdf5187ee71cdcdd9173d18dedca..b623ff9f0864a438391bf9d7fb0225abf84df462 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2009-2013  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // Author: AndrĂ© RIBES - EDF R&D
 //
 #include "Launcher_Job_Command.hxx"
+#include "Basics_DirUtils.hxx"
 
 #ifdef WITH_LIBBATCH
-#include <Batch/Batch_Constants.hxx>
+#include <libbatch/Constants.hxx>
 #endif
 
 #ifdef WNT
@@ -40,7 +41,6 @@ Launcher::Job_Command::update_job()
 #ifdef WITH_LIBBATCH
   Batch::Parametre params = common_job_params();
   params[Batch::EXECUTABLE] = buildCommandScript(params, _launch_date);
-  params[Batch::EXCLUSIVE] = false;
   _batch_job->setParametre(params);
 #endif
 }
@@ -54,7 +54,7 @@ Launcher::Job_Command::buildCommandScript(Batch::Parametre params, std::string l
 
   // File name
   std::string launch_date_port_file = launch_date;
-  std::string launch_script = "/tmp/runCommand_" + _job_file_name + "_" + launch_date + ".sh";
+  std::string launch_script = Kernel_Utils::GetTmpDir() + "runCommand_" + _job_file_name + "_" + launch_date + ".sh";
   std::ofstream launch_script_stream;
   launch_script_stream.open(launch_script.c_str(), std::ofstream::out);