]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
new functionnalities for colocalisation optimization in GEOMClient KLOSS_br1_20040312
authorfkl <fkl>
Wed, 11 Feb 2004 11:13:18 +0000 (11:13 +0000)
committerfkl <fkl>
Wed, 11 Feb 2004 11:13:18 +0000 (11:13 +0000)
src/Container/Container_i.cxx
src/Container/SALOME_Container_i.hxx

index 05f7c84f8bd39602717fe45a2f742ada8b3cbbd1..ecff86fdd4e70dedc52b341d9265f74ad0978bbf 100644 (file)
@@ -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()));
+}
index ee6e460d5e950d7b3ff61c94bd35d205dd3dec3d..61ce9d308a3793133cb0ad17f48977cf7e6faea7 100644 (file)
@@ -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;
 
 };