(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.11.16.6 and 1.11.16.7

version 1.11.16.6, 2006/12/29 17:47:32 version 1.11.16.7, 2006/12/29 22:22:04
Line 55 
Line 55 
 #define PROCSIZE sizeof(struct procsinfo) #define PROCSIZE sizeof(struct procsinfo)
 } }
 #endif #endif
 #include <Pegasus/ExecutorClient/ExecutorClient.h>  
  
 PEGASUS_USING_PEGASUS; PEGASUS_USING_PEGASUS;
 PEGASUS_USING_STD; PEGASUS_USING_STD;
Line 122 
Line 121 
 { {
 #if defined(PEGASUS_ENABLE_PRIVILEGE_SEPARATION) #if defined(PEGASUS_ENABLE_PRIVILEGE_SEPARATION)
  
     // Register to handle SIGUSR1:  
     getSigHandle()->registerHandler(PEGASUS_SIGUSR1, sigUsr1Handler);  
     getSigHandle()->activate(PEGASUS_SIGUSR1);  
   
     // Register to handle SIGTERM:  
     getSigHandle()->registerHandler(SIGTERM, sigTermHandler);     getSigHandle()->registerHandler(SIGTERM, sigTermHandler);
     getSigHandle()->activate(SIGTERM);     getSigHandle()->activate(SIGTERM);
   
     // Set umask to use when creating files.  
     umask(S_IRWXG | S_IRWXO);  
   
     // Save process id.  
     server_pid = getpid();     server_pid = getpid();
  
     // Ask the executor process to daemonize.  
     ExecutorClient::daemonizeExecutor();  
   
     return 0;     return 0;
  
 #else /* !defined(PEGASUS_ENABLE_PRIVILEGE_SEPARATION) */ #else /* !defined(PEGASUS_ENABLE_PRIVILEGE_SEPARATION) */
Line 149 
Line 135 
     getSigHandle()->activate(SIGTERM);     getSigHandle()->activate(SIGTERM);
  
     pid_t pid;     pid_t pid;
   
     if ((pid = fork()) < 0)     if ((pid = fork()) < 0)
     {     {
         getSigHandle()->deactivate(PEGASUS_SIGUSR1);         getSigHandle()->deactivate(PEGASUS_SIGUSR1);
Line 172 
Line 157 
         }         }
         if (!handleSigUsr1)         if (!handleSigUsr1)
         {         {
             MessageLoaderParms parms(          MessageLoaderParms parms("src.Service.ServerProcessUnix.CIMSERVER_START_TIMEOUT",
                 "src.Service.ServerProcessUnix.CIMSERVER_START_TIMEOUT",            "The cimserver command timed out waiting for the CIM server to start.");
                 "The cimserver command timed out waiting for the "          PEGASUS_STD(cerr) << MessageLoader::getMessage(parms) << PEGASUS_STD(endl);
                 "CIM server to start.");  
             PEGASUS_STD(cerr) << MessageLoader::  
                 getMessage(parms) << PEGASUS_STD(endl);  
         }         }
         exit(graveError);         exit(graveError);
     }     }
  
     setsid();     setsid();
   
     umask(S_IRWXG | S_IRWXO);     umask(S_IRWXG | S_IRWXO);
  
     // spawned daemon process doesn't need the old signal handlers of its    // spawned daemon process doesn't need the old signal handlers of its parent
     // parent  
     getSigHandle()->deactivate(PEGASUS_SIGUSR1);     getSigHandle()->deactivate(PEGASUS_SIGUSR1);
     getSigHandle()->deactivate(SIGTERM);     getSigHandle()->deactivate(SIGTERM);
  
     // get the pid of the cimserver process     // get the pid of the cimserver process
     server_pid = getpid();     server_pid = getpid();
   
     return (0);     return (0);
  
 #endif /* !defined(PEGASUS_ENABLE_PRIVILEGE_SEPARATION) */ #endif /* !defined(PEGASUS_ENABLE_PRIVILEGE_SEPARATION) */
Line 499 
Line 478 
     if (aixcimsrvrunning(pid, getProcessName())!=-1)     if (aixcimsrvrunning(pid, getProcessName())!=-1)
         return true;         return true;
 #endif #endif
   
   return false;   return false;
 } }
  


Legend:
Removed from v.1.11.16.6  
changed lines
  Added in v.1.11.16.7

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2