From 6f6b253deed134c5fee37e1e3d2fd44b18e1db6e Mon Sep 17 00:00:00 2001 From: Sanju Rakonde Date: Tue, 17 Dec 2019 15:52:30 +0530 Subject: glusterd: unlink the file after killing the process In glusterd_proc_stop(), after killing the pid we should remove the pidfile. fixes: bz#1784375 Change-Id: Ib6367aed590932c884b0f6f892fc40542aa19686 Signed-off-by: Sanju Rakonde --- xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xlators') diff --git a/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c index 36018a05560..d96adcae89e 100644 --- a/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c +++ b/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c @@ -107,6 +107,8 @@ glusterd_proc_stop(glusterd_proc_t *proc, int sig, int flags) "service, reason:%s", proc->name, strerror(errno)); } + } else { + (void)glusterd_unlink_file(proc->pidfile); } if (flags != PROC_STOP_FORCE) goto out; -- cgit