From: fkl Date: Wed, 11 Feb 2004 11:13:18 +0000 (+0000) Subject: new functionnalities for colocalisation optimization in GEOMClient X-Git-Tag: KLOSS_br1_20040312 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5776f6252a60ed16174c604d7fb8613ece163126;p=modules%2Fkernel.git new functionnalities for colocalisation optimization in GEOMClient --- diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index 05f7c84f8..ecff86fdd 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -58,6 +58,7 @@ Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb, int argc , char* argv[] ) : _numInstance(0) { + _pid = (long)getpid(); ActSigIntHandler() ; @@ -124,6 +125,7 @@ Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb, int flag ) : _numInstance(0) { + _pid = (long)getpid(); string hostname = GetHostname(); SCRUTE(hostname); @@ -461,3 +463,15 @@ void SigIntHandler(int what , siginfo_t * siginfo , return ; } } + +// Get the PID of the Container + +long Engines_Container_i::getPID() { + return(_pid); +} + +// Get the hostName of the Container + +char* Engines_Container_i::getHostName() { + return((char*)(GetHostname().c_str())); +} diff --git a/src/Container/SALOME_Container_i.hxx b/src/Container/SALOME_Container_i.hxx index ee6e460d5..61ce9d308 100644 --- a/src/Container/SALOME_Container_i.hxx +++ b/src/Container/SALOME_Container_i.hxx @@ -70,6 +70,8 @@ public: char* machineName(); void ping(); bool Kill_impl() ; + char* getHostName(); + long getPID(); protected: @@ -88,6 +90,7 @@ private: int _argc ; char** _argv ; + long _pid; };