代码拉取完成,页面将自动刷新
From 25f16b1de313ce0d411f754572f94f051bfbe3c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]>
Date: Tue, 16 Mar 2021 17:28:15 +0100
Subject: [PATCH] quota_nld: Initialize sa_mask when registering PID file
removal
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
term_action.sa_mask is an automatic variable and and thus unitialized.
This patch empties the signal mask.
Signed-off-by: Petr Písař <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
---
quota_nld.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/quota_nld.c b/quota_nld.c
index 72d99a9..09c4775 100644
--- a/quota_nld.c
+++ b/quota_nld.c
@@ -466,7 +466,7 @@ static void use_pid_file(void)
term_action.sa_handler = remove_pid;
term_action.sa_flags = 0;
- if (sigaction(SIGTERM, &term_action, NULL))
+ if (sigemptyset(&term_action.sa_mask) || sigaction(SIGTERM, &term_action, NULL))
errstr(_("Could not register PID file removal on SIGTERM.\n"));
if (store_pid())
errstr(_("Could not store my PID %jd.\n"), (intmax_t )getpid());
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。