summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2014-08-15 09:45:28 +0200
committerNiels de Vos <ndevos@redhat.com>2014-08-15 09:46:05 -0700
commitb9a52cc273cafe26b856331fcd9a804e876710a8 (patch)
tree4bdb7e632bd63ddbe9cbb21dd4f76ce5791f3aa1
parent2dfe3715b56a90d5b7df914c7b67d308b0b45b67 (diff)
glusterd: call runner_end even if runner_start fails
Cherry picked from commit aa199093fdf37dcd87a73cea83f9b9164d5800c5: > Change-Id: I5eca01a131307ba3be2aed4922eea73025ff284c > BUG: 1081013 > Signed-off-by: Jeff Darcy <jdarcy@redhat.com> > Reviewed-on: http://review.gluster.org/7360 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Niels de Vos <ndevos@redhat.com> > Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> > Reviewed-by: Anand Avati <avati@redhat.com> Change-Id: I5eca01a131307ba3be2aed4922eea73025ff284c BUG: 1081016 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/8490 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index ded09f154ce..004a1a0c24d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -5067,6 +5067,17 @@ glusterd_add_inode_size_to_dict (dict_t *dict, int count)
"size for %s : %s package missing", fs_name,
((strcmp (fs_name, "xfs")) ?
"e2fsprogs" : "xfsprogs"));
+ /*
+ * Runner_start might return an error after the child has
+ * been forked, e.g. if the program isn't there. In that
+ * case, we still need to call runner_end to reap the
+ * child and free resources. Fortunately, that seems to
+ * be harmless for other kinds of failures.
+ */
+ if (runner_end(&runner)) {
+ gf_log (THIS->name, GF_LOG_ERROR,
+ "double failure calling runner_end");
+ }
goto out;
}