summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorSanju Rakonde <srakonde@redhat.com>2019-12-17 15:52:30 +0530
committerAmar Tumballi <amarts@gmail.com>2019-12-18 03:46:52 +0000
commit6f6b253deed134c5fee37e1e3d2fd44b18e1db6e (patch)
tree61109043ca5c812a2773ad09e3730a3813e5623a /xlators/mgmt
parent8537d5bda5fa5d52840e24884eaa3f2bcfcd6bd9 (diff)
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 <srakonde@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c2
1 files changed, 2 insertions, 0 deletions
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;