--- innwebd/service.cpp 2004/07/04 06:45:23 1.3 +++ innwebd/service.cpp 2004/08/10 19:55:57 1.5 @@ -35,23 +35,26 @@ void service::Run() this->ctrld.InitThreadPool(); - if (this->ctrld.begin() == 0) + while (this->m_bIsRunning) { - syslog << logfile::log_head << "Begin CONTROL ... 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(); + this->ctrld.StartupChild(); + + break; + } + syslog << logfile::log_head << "Begin CONTROLD ... Failed" << endl; + Sleep(1000 * 60); } - else + + while (this->m_bIsRunning && this->ctrld.IsRunning()) { - syslog << logfile::log_head << "Begin CONTROL ... Failed" << endl; - } + Sleep(100); + } + + this->ctrld.ShutdownChild(); if (this->ctrld.end() == 0) {