From 0ebb50c91e26139958619f11f7ad932567f17c05 Mon Sep 17 00:00:00 2001 From: zhanchengbin Date: Tue, 13 Sep 2022 12:06:37 -0400 Subject: nfs-blkmapd: Fix the error status when nfs-blkmapd stops 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. Reviewed-by: Christoph Hellwig Signed-off-by: zhanchengbin Signed-off-by: Steve Dickson --- utils/blkmapd/device-discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/blkmapd/device-discovery.c b/utils/blkmapd/device-discovery.c index 2736ac8..49935c2 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) { -- cgit v1.2.1