summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/ctx.c
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2012-08-20 10:48:16 -0700
committerAnand Avati <avati@redhat.com>2012-09-21 20:43:05 -0700
commit373b25827f0250d11461fbe76dd6a0e295069171 (patch)
tree5f175e9cafdba5346d7a19515d67e659339a3cee /libglusterfs/src/ctx.c
parenta6234eeb2a0fb106b801a3241ce7538fd5562ff6 (diff)
core: enable process to return the appropriate error code
Setup a pipe() in glusterfs_ctx_t to communicate with the fork'ed child the exit status and return it to the shell. Change-Id: Ibbaa581d45acb24d5141e43ae848cae29312d95f BUG: 762935 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3836 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'libglusterfs/src/ctx.c')
-rw-r--r--libglusterfs/src/ctx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/ctx.c b/libglusterfs/src/ctx.c
index 01489fbe0..0082601d4 100644
--- a/libglusterfs/src/ctx.c
+++ b/libglusterfs/src/ctx.c
@@ -34,6 +34,9 @@ glusterfs_ctx_new ()
INIT_LIST_HEAD (&ctx->graphs);
INIT_LIST_HEAD (&ctx->mempool_list);
+ ctx->daemon_pipe[0] = -1;
+ ctx->daemon_pipe[1] = -1;
+
ret = pthread_mutex_init (&ctx->lock, NULL);
if (ret) {
free (ctx);