1 Star 0 Fork 35

baizg1107/A-Tune

forked from src-openEuler/A-Tune 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-atune-add-successExitStatus-100-to-atuned.service.patch 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
From e45f1c5d09938dc2911c0b5d57ef8feb1b951c97 Mon Sep 17 00:00:00 2001
From: Zhipeng Xie <xiezhipeng1@huawei.com>
Date: Sun, 20 Sep 2020 23:59:54 -0400
Subject: [PATCH] Add SuccessExitStatus=100 to atuned.service
call os.Exit(100) when get killed signal
Fix https://gitee.com/openeuler/A-Tune/issues/I1VCQY?from=project-issue
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
---
common/service/pyservice/pyservice.go | 4 ++--
misc/atuned.service | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/common/service/pyservice/pyservice.go b/common/service/pyservice/pyservice.go
index 99b2239..b3df55c 100644
--- a/common/service/pyservice/pyservice.go
+++ b/common/service/pyservice/pyservice.go
@@ -14,10 +14,10 @@
package pyservice
import (
+ "bufio"
"gitee.com/openeuler/A-Tune/common/config"
"gitee.com/openeuler/A-Tune/common/log"
"gitee.com/openeuler/A-Tune/common/registry"
- "bufio"
"io"
"os"
"os/exec"
@@ -94,5 +94,5 @@ func listenToSystemSignals(cmd *exec.Cmd) {
signal.Notify(signalChan, os.Interrupt, syscall.SIGTERM)
<-signalChan
_ = syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
- os.Exit(-1)
+ os.Exit(100)
}
diff --git a/misc/atuned.service b/misc/atuned.service
index e2a8851..3b31b6e 100644
--- a/misc/atuned.service
+++ b/misc/atuned.service
@@ -6,6 +6,7 @@ Requires=polkit.service
[Service]
Type=notify
ExecStart=/usr/bin/atuned
+SuccessExitStatus=100
[Install]
WantedBy=multi-user.target
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bzg1107/A-Tune.git
git@gitee.com:bzg1107/A-Tune.git
bzg1107
A-Tune
A-Tune
master

搜索帮助