* [PATCH] nfs-blkmapd: Fix the error status when nfs-blkmapd stops
@ 2022-09-01 13:44 zhanchengbin
2022-09-09 13:27 ` Christoph Hellwig
2022-09-13 17:39 ` Steve Dickson
0 siblings, 2 replies; 3+ messages in thread
From: zhanchengbin @ 2022-09-01 13:44 UTC (permalink / raw)
To: steved; +Cc: linux-nfs, liuzhiqiang26, linfeilong
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nfs-blkmapd: Fix the error status when nfs-blkmapd stops
2022-09-01 13:44 [PATCH] nfs-blkmapd: Fix the error status when nfs-blkmapd stops zhanchengbin
@ 2022-09-09 13:27 ` Christoph Hellwig
2022-09-13 17:39 ` Steve Dickson
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2022-09-09 13:27 UTC (permalink / raw)
To: zhanchengbin; +Cc: steved, linux-nfs, liuzhiqiang26, linfeilong
On Thu, Sep 01, 2022 at 09:44:08PM +0800, zhanchengbin wrote:
> 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.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nfs-blkmapd: Fix the error status when nfs-blkmapd stops
2022-09-01 13:44 [PATCH] nfs-blkmapd: Fix the error status when nfs-blkmapd stops zhanchengbin
2022-09-09 13:27 ` Christoph Hellwig
@ 2022-09-13 17:39 ` Steve Dickson
1 sibling, 0 replies; 3+ messages in thread
From: Steve Dickson @ 2022-09-13 17:39 UTC (permalink / raw)
To: zhanchengbin; +Cc: linux-nfs, liuzhiqiang26, linfeilong
On 9/1/22 9:44 AM, zhanchengbin wrote:
> 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>
Committed... (tag: nfs-utils-2-6-3-rc1)
steved.
> ---
> 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)
> {
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-13 18:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-01 13:44 [PATCH] nfs-blkmapd: Fix the error status when nfs-blkmapd stops zhanchengbin
2022-09-09 13:27 ` Christoph Hellwig
2022-09-13 17:39 ` Steve Dickson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox