summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-svc-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-svc-helper.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-svc-helper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-svc-helper.c b/xlators/mgmt/glusterd/src/glusterd-svc-helper.c
index f53bd417e05..55f4a489702 100644
--- a/xlators/mgmt/glusterd/src/glusterd-svc-helper.c
+++ b/xlators/mgmt/glusterd/src/glusterd-svc-helper.c
@@ -486,9 +486,9 @@ glusterd_shd_svc_mux_init(glusterd_volinfo_t *volinfo, glusterd_svc_t *svc)
if (!mux_proc) {
if (pid != -1 && sys_access(svc->proc.pidfile, R_OK) == 0) {
- /* stale pid file, unlink it. */
- kill(pid, SIGTERM);
- sys_unlink(svc->proc.pidfile);
+ /* stale pid file, stop and unlink it */
+ glusterd_proc_stop(&svc->proc, SIGTERM, PROC_STOP_FORCE);
+ glusterd_unlink_file(svc->proc.pidfile);
}
mux_proc = __gf_find_compatible_svc(GD_NODE_SHD);
}