summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src/glusterfsd-mgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'glusterfsd/src/glusterfsd-mgmt.c')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 646b4399019..c5000da4175 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -245,6 +245,9 @@ glusterfs_handle_terminate (rpcsvc_request_t *req)
"terminating after loss of last child %s",
xlator_req.name);
glusterfs_mgmt_pmap_signout (glusterfsd_ctx, xlator_req.name);
+ sleep(1); /* to avoid race between above messages and socket
+ * disconnect notification to glusterd
+ */
kill (getpid(), SIGTERM);
} else {
/*