From: crouzet Date: Thu, 13 Dec 2012 11:29:13 +0000 (+0000) Subject: bug on ccrt + eris X-Git-Tag: V2_0_0a1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f9cfa27307e650551fd1f69d616cdec5f9ff2efd;p=tools%2Flibbatch.git bug on ccrt + eris --- diff --git a/src/CCC/Batch_BatchManager_eCCC.cxx b/src/CCC/Batch_BatchManager_eCCC.cxx index c13b0f3..83443ee 100644 --- a/src/CCC/Batch_BatchManager_eCCC.cxx +++ b/src/CCC/Batch_BatchManager_eCCC.cxx @@ -94,7 +94,7 @@ namespace Batch { string logFile = generateTemporaryFileName("CCC-submitlog"); // define command to submit batch - string subCommand = string("bash -l -c \"cd ") + workDir + "; ccc_msub " + fileNameToExecute + "_Batch.sh\""; + string subCommand = string("bash -l -c \\\"cd ") + workDir + "; ccc_msub " + fileNameToExecute + "_Batch.sh\\\""; string command = _protocol.getExecCommand(subCommand, _hostname, _username); command += " > "; command += logFile; @@ -143,7 +143,7 @@ namespace Batch { iss >> ref; // define command to delete batch - string subCommand = string("bash -l -c \"ccc_mdel ") + iss.str() + string("\""); + string subCommand = string("bash -l -c \\\"ccc_mdel ") + iss.str() + string("\\\""); string command = _protocol.getExecCommand(subCommand, _hostname, _username); cerr << command.c_str() << endl; status = system(command.c_str()); @@ -195,7 +195,7 @@ namespace Batch { string logFile = generateTemporaryFileName(string("CCC-querylog-id") + jobid.getReference()); // define command to query batch - string subCommand = string("bash -l -c \"bjobs ") + iss.str() + string("\""); + string subCommand = string("bash -l -c \\\"bjobs ") + iss.str() + string("\\\""); string command = _protocol.getExecCommand(subCommand, _hostname, _username); command += " > "; command += logFile; diff --git a/src/Core/Batch_CommunicationProtocol.cxx b/src/Core/Batch_CommunicationProtocol.cxx index 82f5b4f..8a3ef6a 100644 --- a/src/Core/Batch_CommunicationProtocol.cxx +++ b/src/Core/Batch_CommunicationProtocol.cxx @@ -151,11 +151,7 @@ namespace Batch { // if the argument contains spaces, we surround it with simple quotes (Linux) // or double quotes (Windows) if (commandArgs[i].find(' ') != string::npos) { -#ifdef WIN32 commandStr += string("\"") + commandArgs[i] + "\""; -#else - commandStr += string("\'") + commandArgs[i] + "\'"; -#endif } else { commandStr += commandArgs[i]; }