summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src/glusterfsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'glusterfsd/src/glusterfsd.c')
-rw-r--r--glusterfsd/src/glusterfsd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index 09ba9cd8086..81bc15b8b28 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -1316,7 +1316,7 @@ cleanup_and_exit (int signum)
trav = trav->next;
}
- exit(0);
+ exit(signum);
}
@@ -2196,6 +2196,7 @@ glusterfs_process_volfp (glusterfs_ctx_t *ctx, FILE *fp)
glusterfs_graph_t *graph = NULL;
int ret = -1;
xlator_t *trav = NULL;
+ int err = 0;
graph = glusterfs_graph_construct (fp);
if (!graph) {
@@ -2232,7 +2233,9 @@ out:
if (ret && !ctx->active) {
glusterfs_graph_destroy (graph);
/* there is some error in setting up the first graph itself */
- cleanup_and_exit (0);
+ err = -ret;
+ sys_write (ctx->daemon_pipe[1], (void *) &err, sizeof (err));
+ cleanup_and_exit (err);
}
return ret;