(file) Return to ServerProcessUnix.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Service

Diff for /pegasus/src/Service/ServerProcessUnix.cpp between version 1.15 and 1.16

version 1.15, 2007/05/25 18:35:22 version 1.16, 2007/06/13 21:26:00
Line 35 
Line 35 
 #include <unistd.h> #include <unistd.h>
  
 #include <Pegasus/Common/Signal.h> #include <Pegasus/Common/Signal.h>
   #include <Pegasus/Common/Executor.h>
  
 #define MAX_WAIT_TIME 240 #define MAX_WAIT_TIME 240
  
Line 97 
Line 98 
  
 int ServerProcess::cimserver_fork(void) int ServerProcess::cimserver_fork(void)
 { {
 #if defined(PEGASUS_ENABLE_PRIVILEGE_SEPARATION)  
   
     getSigHandle()->registerHandler(SIGTERM, sigTermHandler);     getSigHandle()->registerHandler(SIGTERM, sigTermHandler);
     getSigHandle()->activate(SIGTERM);     getSigHandle()->activate(SIGTERM);
     umask(S_IRWXG | S_IRWXO);     umask(S_IRWXG | S_IRWXO);
  
       if (Executor::detectExecutor() == 0)
       {
           // We don't need to fork if we're running with Privilege Separation
     return 0;     return 0;
       }
 #else /* !defined(PEGASUS_ENABLE_PRIVILEGE_SEPARATION) */  
  
     getSigHandle()->registerHandler(PEGASUS_SIGUSR1, sigUsr1Handler);     getSigHandle()->registerHandler(PEGASUS_SIGUSR1, sigUsr1Handler);
     getSigHandle()->activate(PEGASUS_SIGUSR1);     getSigHandle()->activate(PEGASUS_SIGUSR1);
     getSigHandle()->registerHandler(SIGTERM, sigTermHandler);  
     getSigHandle()->activate(SIGTERM);  
  
   pid_t pid;   pid_t pid;
   if( (pid = fork() ) < 0)   if( (pid = fork() ) < 0)
Line 149 
Line 148 
   getSigHandle()->deactivate(PEGASUS_SIGUSR1);   getSigHandle()->deactivate(PEGASUS_SIGUSR1);
   getSigHandle()->deactivate(SIGTERM);   getSigHandle()->deactivate(SIGTERM);
  
   return(0);    return 0;
   
 #endif /* !defined(PEGASUS_ENABLE_PRIVILEGE_SEPARATION) */  
 } }
  
  


Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2