Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
e212b817
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
接近 2 年 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e212b817
编写于
1月 13, 2023
作者:
X
xu_yuntong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ondemand
Signed-off-by:
N
xu_yuntong
<
xu_yuntong@hoperun.com
>
上级
f5dc3fa9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
6 deletion
+5
-6
services/etc/ueventd.cfg
services/etc/ueventd.cfg
+0
-1
services/init/init_common_service.c
services/init/init_common_service.c
+5
-5
未找到文件。
services/etc/ueventd.cfg
浏览文件 @
e212b817
...
...
@@ -20,7 +20,6 @@
]
}],
"caps" : ["DAC_OVERRIDE", "MKNOD", "CHOWN", "FOWNER"],
"critical" : [ 0, 15, 5],
"ondemand" : true,
"sandbox" : 0,
"start-mode" : "condition",
...
...
services/init/init_common_service.c
浏览文件 @
e212b817
...
...
@@ -525,6 +525,11 @@ void ServiceReap(Service *service)
// the service could be restart even if it is one-shot service
}
// service no need to restart if it is an ondemand service.
if
(
IsOnDemandService
(
service
))
{
CheckOndemandService
(
service
);
return
;
}
if
(
service
->
attribute
&
SERVICE_ATTR_CRITICAL
)
{
// critical
if
(
!
CalculateCrashTime
(
service
,
service
->
crashTime
,
service
->
crashCount
))
{
INIT_LOGE
(
"Critical service
\"
%s
\"
crashed %d times, rebooting system"
,
...
...
@@ -537,11 +542,6 @@ void ServiceReap(Service *service)
return
;
}
}
// service no need to restart if it is an ondemand service.
if
(
IsOnDemandService
(
service
))
{
CheckOndemandService
(
service
);
return
;
}
int
ret
=
ExecRestartCmd
(
service
);
INIT_CHECK_ONLY_ELOG
(
ret
==
SERVICE_SUCCESS
,
"Failed to exec restartArg for %s"
,
service
->
name
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录