/[LeafOK_CVS]/innwebd/service.cpp
ViewVC logotype

Diff of /innwebd/service.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 by sysadm, Sun Jul 4 06:45:23 2004 UTC Revision 1.6 by sysadm, Thu Sep 16 15:42:06 2004 UTC
# Line 31  service::~service(void) Line 31  service::~service(void)
31    
32  void service::Run()  void service::Run()
33  {  {
34            int startup_err_count = 0;
35    
36          this->ctrld.StartupDelay();          this->ctrld.StartupDelay();
37    
38          this->ctrld.InitThreadPool();          this->ctrld.InitThreadPool();
39    
40          if (this->ctrld.begin() == 0)          while (this->m_bIsRunning)
41          {          {
42                  syslog << logfile::log_head << "Begin CONTROL ... OK" << endl;                  if (this->ctrld.begin() == 0)
43                    {
44                            syslog << logfile::log_head << "Begin CONTROLD ... OK" << endl;
45    
46                  this->ctrld.StartupChild();                          this->ctrld.StartupChild();
47                            
48                            break;
49                    }
50                    syslog << logfile::log_head << "Begin CONTROLD ... Failed" << endl;
51    
52                  while (this->m_bIsRunning && this->ctrld.IsRunning())                  if (startup_err_count++ > 5)
53                  {                          break;
                     Sleep(100);  
             }  
54    
55                  this->ctrld.ShutdownChild();                  Sleep(1000 * 60 * 5);
56          }          }
57          else  
58            while (this->m_bIsRunning && this->ctrld.IsRunning())
59          {          {
60                  syslog << logfile::log_head << "Begin CONTROL ... Failed" << endl;              Sleep(100);
61          }      }
62    
63            this->ctrld.ShutdownChild();
64    
65          if (this->ctrld.end() == 0)          if (this->ctrld.end() == 0)
66          {          {


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1