| 35 |
|
|
| 36 |
this->ctrld.InitThreadPool(); |
this->ctrld.InitThreadPool(); |
| 37 |
|
|
| 38 |
if (this->ctrld.begin() == 0) |
while (this->m_bIsRunning) |
| 39 |
{ |
{ |
| 40 |
syslog << logfile::log_head << "Begin CONTROLD ... OK" << endl; |
if (this->ctrld.begin() ==0) |
|
|
|
|
this->ctrld.StartupChild(); |
|
|
|
|
|
while (this->m_bIsRunning && this->ctrld.IsRunning()) |
|
| 41 |
{ |
{ |
| 42 |
Sleep(100); |
syslog << logfile::log_head << "Begin CONTROLD ... OK" << endl; |
|
} |
|
| 43 |
|
|
| 44 |
this->ctrld.ShutdownChild(); |
this->ctrld.StartupChild(); |
| 45 |
} |
|
| 46 |
else |
break; |
| 47 |
{ |
} |
| 48 |
syslog << logfile::log_head << "Begin CONTROLD ... Failed" << endl; |
syslog << logfile::log_head << "Begin CONTROLD ... Failed" << endl; |
| 49 |
|
Sleep(1000 * 60); |
| 50 |
} |
} |
| 51 |
|
|
| 52 |
|
while (this->m_bIsRunning && this->ctrld.IsRunning()) |
| 53 |
|
{ |
| 54 |
|
Sleep(100); |
| 55 |
|
} |
| 56 |
|
|
| 57 |
|
this->ctrld.ShutdownChild(); |
| 58 |
|
|
| 59 |
if (this->ctrld.end() == 0) |
if (this->ctrld.end() == 0) |
| 60 |
{ |
{ |
| 61 |
syslog << logfile::log_head << "End CONTROLD ... OK" << endl; |
syslog << logfile::log_head << "End CONTROLD ... OK" << endl; |