From c2a2128b14ba7a11a530ded67acf2f565b0649ab Mon Sep 17 00:00:00 2001 From: prascle Date: Tue, 25 Jan 2005 09:44:08 +0000 Subject: [PATCH] PR: patches from A.Geay --- src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx | 10 ++++++++++ src/ResourcesManager/SALOME_ResourcesManager.cxx | 13 +++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx index 744229cc7..4b110ce6b 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx @@ -172,6 +172,16 @@ Engines::Component_ptr SALOME_LifeCycleCORBA::FindOrLoad_Component 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); diff --git a/src/ResourcesManager/SALOME_ResourcesManager.cxx b/src/ResourcesManager/SALOME_ResourcesManager.cxx index 3742f2f83..7765c7829 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.cxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.cxx @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -202,7 +203,7 @@ string SALOME_ResourcesManager::BuildTempFileToLaunchRemoteContainer(const strin 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(); @@ -359,7 +360,15 @@ void SALOME_ResourcesManager::AddOmninamesParams(ofstream& fileStream) const 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; } -- 2.39.2