From: zhanchengbin <zhanchengbin1@huawei.com>
To: <steved@redhat.com>
Cc: <linux-nfs@vger.kernel.org>, <liuzhiqiang26@huawei.com>,
linfeilong <linfeilong@huawei.com>
Subject: [PATCH] nfs-blkmapd: Fix the error status when nfs-blkmapd stops
Date: Thu, 1 Sep 2022 21:44:08 +0800 [thread overview]
Message-ID: <ae07856f-ef34-270e-91b2-9364fdcd6563@huawei.com> (raw)
The systemctl stop nfs-blkmap.service will sends the SIGTERM signal
to the nfs-blkmap.service first.If the process fails to be stopped,
it sends the SIGKILL signal again to kill the process.
However, exit(1) is executed in the SIGTERM processing function of
nfs-blkmap.service. As a result, systemd receives an error message
indicating that nfs-blkmap.service failed.
"Active: failed" is displayed when the systemctl status
nfs-blkmap.service command is executed.
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
---
utils/blkmapd/device-discovery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/blkmapd/device-discovery.c
b/utils/blkmapd/device-discovery.c
index 2736ac89..49935c2e 100644
--- a/utils/blkmapd/device-discovery.c
+++ b/utils/blkmapd/device-discovery.c
@@ -462,7 +462,7 @@ static void sig_die(int signal)
unlink(PID_FILE);
}
BL_LOG_ERR("exit on signal(%d)\n", signal);
- exit(1);
+ exit(0);
}
static void usage(void)
{
--
2.33.0
next reply other threads:[~2022-09-01 13:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 13:44 zhanchengbin [this message]
2022-09-09 13:27 ` [PATCH] nfs-blkmapd: Fix the error status when nfs-blkmapd stops Christoph Hellwig
2022-09-13 17:39 ` Steve Dickson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ae07856f-ef34-270e-91b2-9364fdcd6563@huawei.com \
--to=zhanchengbin1@huawei.com \
--cc=linfeilong@huawei.com \
--cc=linux-nfs@vger.kernel.org \
--cc=liuzhiqiang26@huawei.com \
--cc=steved@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox