--- innwebd/service.cpp 2004/07/09 00:33:38 1.4 +++ innwebd/service.cpp 2004/08/10 19:55:57 1.5 @@ -35,24 +35,27 @@ void service::Run() this->ctrld.InitThreadPool(); - if (this->ctrld.begin() == 0) + while (this->m_bIsRunning) { - syslog << logfile::log_head << "Begin CONTROLD ... OK" << endl; - - this->ctrld.StartupChild(); - - while (this->m_bIsRunning && this->ctrld.IsRunning()) + if (this->ctrld.begin() ==0) { - Sleep(100); - } + syslog << logfile::log_head << "Begin CONTROLD ... OK" << endl; - this->ctrld.ShutdownChild(); - } - else - { + this->ctrld.StartupChild(); + + break; + } syslog << logfile::log_head << "Begin CONTROLD ... Failed" << endl; + Sleep(1000 * 60); } + while (this->m_bIsRunning && this->ctrld.IsRunning()) + { + Sleep(100); + } + + this->ctrld.ShutdownChild(); + if (this->ctrld.end() == 0) { syslog << logfile::log_head << "End CONTROLD ... OK" << endl;