(file) Return to OOPProviderManagerRouter.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ProviderManagerService / Attic

Diff for /pegasus/src/Pegasus/ProviderManagerService/Attic/OOPProviderManagerRouter.cpp between version 1.4 and 1.5

version 1.4, 2006/10/04 19:42:18 version 1.5, 2006/10/06 17:47:31
Line 64 
Line 64 
 # include <unistd.h>  // For fork(), exec(), and _exit() # include <unistd.h>  // For fork(), exec(), and _exit()
 # include <errno.h> # include <errno.h>
 # include <sys/types.h> # include <sys/types.h>
   # include <sys/resource.h>
 # if defined(PEGASUS_HAS_SIGNALS) # if defined(PEGASUS_HAS_SIGNALS)
 #  include <sys/wait.h> #  include <sys/wait.h>
 # endif # endif
Line 618 
Line 619 
             }             }
 # endif # endif
  
               // Close all file descriptors except stdin/stdout/stderr
               // and the pipe handles needed by the Provider Agent process.
   
               Uint32 readFd = atoi(readHandle);
               Uint32 writeFd = atoi(writeHandle);
               struct rlimit fileLimit;
   
               if (getrlimit(RLIMIT_NOFILE, &fileLimit) == 0)
               {
                   Uint32 maxFd = (Uint32)fileLimit.rlim_cur;
                   for (Uint32 i = 3; i < maxFd - 1; i++)
                   {
                       if ((i != readFd) && (i != writeFd))
                       {
                           close(i);
                       }
                   }
               }
   
             execl(agentCommandPathCString, agentCommandPathCString,             execl(agentCommandPathCString, agentCommandPathCString,
                 readHandle, writeHandle,                 readHandle, writeHandle,
                 (const char*)_moduleName.getCString(), (char*)0);                 (const char*)_moduleName.getCString(), (char*)0);


Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2