char *stContainer=strdup(containerName);
string st2Container(stContainer);
int rg=st2Container.find("/");
+ if(rg>=0)
+ {
+ stContainer[rg]='\0';
+ if(strcmp(stContainer,"localhost")==0)
+ {
+ Engines::Component_ptr ret=FindOrLoad_Component(stContainer+rg+1,componentName);
+ free(stContainer);
+ return ret;
+ }
+ }
if(rg<0) {
//containerName doesn't contain "/" => Local container
free(stContainer);
#include <unistd.h>
#include <fstream>
#include <iostream>
+#include <string.h>
#include <map>
#include <sys/types.h>
tempOutputFile << "SALOME_Container ";
tempOutputFile << containerName << " -";
AddOmninamesParams(tempOutputFile);
- tempOutputFile << " > /tmp/" << containerName << "_" << machine << ".log 2>&1 &" << endl;//" &" << endl;
+ tempOutputFile << " > /tmp/" << "/" << containerName << "_" << machine << ".log 2>&1 &" << endl;//" &" << endl;
//tempOutputFile << "EOF" << endl;
//tempOutputFile << "&" << endl;
tempOutputFile.flush();
string SALOME_ResourcesManager::BuildTemporaryFileName() const
{
//build more complex file name to support multiple salome session
- return "/tmp/command.sh";
+ string command( "/tmp/" );
+ char *temp=new char[14];
+ strcpy(temp,"command");
+ strcat(temp,"XXXXXX");
+ mkstemp(temp);
+ command += temp;
+ delete [] temp;
+ command += ".sh";
+ return command;
}