1 Star 0 Fork 20

src-oepkgs-oE-rv/keepalived

forked from src-openEuler/keepalived 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0005-Fix-detecting-setsid-error-in-xdaemon.patch 884 Bytes
一键复制 编辑 原始数据 按行查看 历史
Randy.Wang 提交于 2021-06-10 09:41 . add upstream patches
From d058988e1f2a67769075066e875cd8b16de931a4 Mon Sep 17 00:00:00 2001
From: Quentin Armitage <quentin@armitage.org.uk>
Date: Thu, 20 Aug 2020 17:06:19 +0100
Subject: [PATCH 322/691] Fix detecting setsid() error in xdaemon()
setsid() return should be checked for < 0 rather than < -1. This
error was fixed in the zebra code in 2004!
Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
---
keepalived/core/daemon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keepalived/core/daemon.c b/keepalived/core/daemon.c
index 0e3621d..3f99d34 100644
--- a/keepalived/core/daemon.c
+++ b/keepalived/core/daemon.c
@@ -59,7 +59,7 @@ xdaemon(bool nochdir, bool noclose, bool exitflag)
/* Become session leader and get pid. */
pid = setsid();
- if (pid < -1) {
+ if (pid < 0) {
log_message(LOG_INFO, "xdaemon: setsid error");
return -1;
}
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-oepkgs-oe-rv/keepalived.git
git@gitee.com:src-oepkgs-oe-rv/keepalived.git
src-oepkgs-oe-rv
keepalived
keepalived
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385