提交 e3e0a79d 编写于 作者: X xionglei6

modify: service critical

Signed-off-by: Nxionglei6 <xionglei6@huawei.com>
上级 feafe7ec
......@@ -46,10 +46,6 @@
#ifndef TIOCSCTTY
#define TIOCSCTTY 0x540E
#endif
// 240 seconds, 4 minutes
static const int DEFAULT_CRASH_TIME = 240;
// maximum number of crashes within time DEFAULT_CRASH_TIME for one service
static const int DEFAULT_CRASH_COUNT = 4;
static int SetAllAmbientCapability(void)
{
......@@ -335,8 +331,8 @@ void ServiceReap(Service *service)
ExecReboot("reboot");
}
} else if (!(service->attribute & SERVICE_ATTR_NEED_RESTART)) {
if (CalculateCrashTime(service, DEFAULT_CRASH_TIME, DEFAULT_CRASH_COUNT) == false) {
INIT_LOGE("Service name=%s, crash %d times, no more start.", service->name, DEFAULT_CRASH_COUNT);
if (CalculateCrashTime(service, service->crashTime, service->crashCount) == false) {
INIT_LOGE("Service name=%s, crash %d times, no more start.", service->name, service->crashCount);
return;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册