54 lines
1.5 KiB
Diff
54 lines
1.5 KiB
Diff
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
|
|
|