diff --git a/opal/mca/pmix/base/pmix_base_fns.c b/opal/mca/pmix/base/pmix_base_fns.c index d129cf1df0a..7dd6752d531 100644 --- a/opal/mca/pmix/base/pmix_base_fns.c +++ b/opal/mca/pmix/base/pmix_base_fns.c @@ -121,6 +121,7 @@ static void lookup_cbfunc(int status, opal_list_t *data, void *cbdata) static void opcbfunc(int status, void *cbdata) { struct lookup_caddy_t *cd = (struct lookup_caddy_t*)cbdata; + cd->status = status; cd->active = false; } @@ -155,27 +156,29 @@ int opal_pmix_base_exchange(opal_value_t *indat, return rc; } } else { - caddy.active = true; - rc = opal_pmix.publish_nb(&ilist, opcbfunc, &caddy); - if (OPAL_SUCCESS != rc) { - OPAL_ERROR_LOG(rc); - OPAL_LIST_DESTRUCT(&ilist); - return rc; - } - while (caddy.active) { - usleep(10); - } - OPAL_LIST_DESTRUCT(&ilist); - if (OPAL_SUCCESS != caddy.status) { - OPAL_ERROR_LOG(caddy.status); - return caddy.status; - } - } - - /* lookup the other side's info - if a non-blocking form - * of lookup isn't available, then we use the blocking - * form and trust that the underlying system will WAIT - * until the other side publishes its data */ + caddy.status = -1; + caddy.active = true; + caddy.pdat = NULL; + rc = opal_pmix.publish_nb(&ilist, opcbfunc, &caddy); + if (OPAL_SUCCESS != rc) { + OPAL_ERROR_LOG(rc); + OPAL_LIST_DESTRUCT(&ilist); + return rc; + } + while (caddy.active) { + usleep(10); + } + OPAL_LIST_DESTRUCT(&ilist); + if (OPAL_SUCCESS != caddy.status) { + OPAL_ERROR_LOG(caddy.status); + return caddy.status; + } + } + + /* lookup the other side's info - if a non-blocking form + * of lookup isn't available, then we use the blocking + * form and trust that the underlying system will WAIT + * until the other side publishes its data */ pdat = OBJ_NEW(opal_pmix_pdata_t); pdat->value.key = strdup(outdat->value.key); pdat->value.type = outdat->value.type; @@ -214,6 +217,7 @@ int opal_pmix_base_exchange(opal_value_t *indat, return rc; } } else { + caddy.status = -1; caddy.active = true; caddy.pdat = pdat; keys = NULL; diff --git a/orte/mca/odls/base/odls_base_default_fns.c b/orte/mca/odls/base/odls_base_default_fns.c index a243157a4a3..932980d3e15 100644 --- a/orte/mca/odls/base/odls_base_default_fns.c +++ b/orte/mca/odls/base/odls_base_default_fns.c @@ -702,7 +702,6 @@ void orte_odls_base_spawn_proc(int fd, short sd, void *cbdata) opal_argv_free(argvptr); } if (ORTE_SUCCESS != rc) { - opal_output(0, "%s:%d", __FILE__, __LINE__); state = ORTE_PROC_STATE_FAILED_TO_LAUNCH; goto errorout; } @@ -798,6 +797,7 @@ void orte_odls_base_spawn_proc(int fd, short sd, void *cbdata) errorout: ORTE_FLAG_UNSET(child, ORTE_PROC_FLAG_ALIVE); + child->exit_code = rc; ORTE_ACTIVATE_PROC_STATE(&child->name, state); OBJ_RELEASE(cd); }