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

Diff for /pegasus/src/Server/cimserver.cpp between version 1.211.4.3 and 1.212

version 1.211.4.3, 2009/06/08 08:04:18 version 1.212, 2007/10/22 15:00:00
Line 45 
Line 45 
 // //
 // cimserver daemon=false // cimserver daemon=false
 // //
 // The daemon config property has no effect on windows operation or when  // The daemon config property has no effect on windows operation.
 // privilege separation is enabled.  
 // //
 // To shutdown pegasus, use the -s option: // To shutdown pegasus, use the -s option:
 // //
Line 509 
Line 508 
         for (int i = 1; i < argc; )         for (int i = 1; i < argc; )
         {         {
             const char* arg = argv[i];             const char* arg = argv[i];
             if (strcmp(arg, "--help") == 0)              if (String::equal(arg,"--help"))
             {             {
                 PrintHelp(argv[0]);                 PrintHelp(argv[0]);
                 Executor::daemonizeExecutor();  
                 exit(0);                 exit(0);
             }             }
             else if (strcmp(arg, "--version") == 0)              else if (String::equal(arg,"--version"))
             {             {
                 cout << _cimServerProcess->getCompleteVersion() << endl;                 cout << _cimServerProcess->getCompleteVersion() << endl;
                 Executor::daemonizeExecutor();  
                 exit(0);                 exit(0);
             }             }
             // Check for -option             // Check for -option
Line 534 
Line 531 
                     strlen(option) == 1)                     strlen(option) == 1)
                 {                 {
                     cout << _cimServerProcess->getCompleteVersion() << endl;                     cout << _cimServerProcess->getCompleteVersion() << endl;
                     Executor::daemonizeExecutor();  
                     exit(0);                     exit(0);
                 }                 }
                 //                 //
Line 544 
Line 540 
                         (strlen(option) == 1))                         (strlen(option) == 1))
                 {                 {
                     PrintHelp(argv[0]);                     PrintHelp(argv[0]);
                     Executor::daemonizeExecutor();  
                     exit(0);                     exit(0);
                 }                 }
 #if !defined(PEGASUS_USE_RELEASE_DIRS) #if !defined(PEGASUS_USE_RELEASE_DIRS)
Line 563 
Line 558 
                             "Missing argument for option -$0",                             "Missing argument for option -$0",
                             opt);                             opt);
                         cout << MessageLoader::getMessage(parms) << endl;                         cout << MessageLoader::getMessage(parms) << endl;
                         exit(1);                          exit(0);
                     }                     }
  
                     memmove(&argv[i], &argv[i + 2], (argc-i-1) * sizeof(char*));                     memmove(&argv[i], &argv[i + 2], (argc-i-1) * sizeof(char*));
Line 607 
Line 602 
                             "Duplicate shutdown option specified.");                             "Duplicate shutdown option specified.");
  
                         cout << MessageLoader::getMessage(parms) << endl;                         cout << MessageLoader::getMessage(parms) << endl;
                         exit(1);                          exit(0);
                     }                     }
  
                     shutdownOption = true;                     shutdownOption = true;
Line 771 
Line 766 
         daemonOption = ConfigManager::parseBooleanValue(         daemonOption = ConfigManager::parseBooleanValue(
             configManager->getCurrentValue("daemon"));             configManager->getCurrentValue("daemon"));
  
         if ((Executor::detectExecutor() == 0) && (daemonOption == false))  
         {  
             MessageLoaderParms parms(  
                 "src.Server.cimserver.PRIVSEP_REQUIRES_DAEMON",  
                 "Warning: The configuration setting daemon=false is ignored "  
                     "with privilege separation enabled.");  
             cerr << MessageLoader::getMessage(parms) << endl;  
             daemonOption = true;  
         }  
   
 #if !defined(PEGASUS_USE_SYSLOGS) #if !defined(PEGASUS_USE_SYSLOGS)
         String logsDirectory = ConfigManager::getHomedPath(         String logsDirectory = ConfigManager::getHomedPath(
             configManager->getCurrentValue("logdir"));             configManager->getCurrentValue("logdir"));
Line 808 
Line 793 
                 configManager->getCurrentValue("shutdownTimeout");                 configManager->getCurrentValue("shutdownTimeout");
             Uint32 timeoutValue =             Uint32 timeoutValue =
                 strtol(configTimeout.getCString(), (char **)0, 10);                 strtol(configTimeout.getCString(), (char **)0, 10);
 #ifdef PEGASUS_SLP_REG_TIMEOUT  
             // To deregister Pegasus with SLP  
             unregisterPegasusFromSLP();  
 #endif  
  
             ServerShutdownClient serverShutdownClient(&_serverRunStatus);             ServerShutdownClient serverShutdownClient(&_serverRunStatus);
             serverShutdownClient.shutdown(timeoutValue);             serverShutdownClient.shutdown(timeoutValue);
Line 1127 
Line 1108 
         // so user knows that there is cimserver ready to serve CIM requests.         // so user knows that there is cimserver ready to serve CIM requests.
         if (daemonOption)         if (daemonOption)
         {         {
   #if defined(PEGASUS_ENABLE_PRIVILEGE_SEPARATION)
               Executor::daemonizeExecutor();
   #else
             _cimServerProcess->notify_parent(0);             _cimServerProcess->notify_parent(0);
   #endif
         }         }
  
 #if defined(PEGASUS_DEBUG) #if defined(PEGASUS_DEBUG)
Line 1164 
Line 1149 
             MessageLoader::getMessage(parms));             MessageLoader::getMessage(parms));
         cerr << MessageLoader::getMessage(parms) << endl;         cerr << MessageLoader::getMessage(parms) << endl;
  
         deleteCIMServer();  
   
         //         //
         // notify parent process (if there is a parent process) to terminate         // notify parent process (if there is a parent process) to terminate
         //         //
         if (daemonOption)         if (daemonOption)
             _cimServerProcess->notify_parent(1);             _cimServerProcess->notify_parent(1);
  
           deleteCIMServer();
         return 1;         return 1;
     }     }
  


Legend:
Removed from v.1.211.4.3  
changed lines
  Added in v.1.212

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2