diff --git a/orte/mca/odls/base/odls_base_frame.c b/orte/mca/odls/base/odls_base_frame.c index 8114210c2b..69fd72db22 100644 --- a/orte/mca/odls/base/odls_base_frame.c +++ b/orte/mca/odls/base/odls_base_frame.c @@ -28,6 +28,7 @@ #include "orte/constants.h" #include +#include #include "opal/class/opal_ring_buffer.h" #include "orte/mca/mca.h" @@ -226,6 +227,7 @@ static int orte_odls_base_open(mca_base_open_flag_t flags) int rc, i, rank; orte_namelist_t *nm; bool xterm_hold; + sigset_t unblock; ORTE_CONSTRUCT_LOCK(&orte_odls_globals.lock); orte_odls_globals.lock.active = false; // start with nobody having the thread @@ -244,6 +246,17 @@ static int orte_odls_base_open(mca_base_open_flag_t flags) OBJ_CONSTRUCT(&orte_odls_globals.xterm_ranks, opal_list_t); orte_odls_globals.xtermcmd = NULL; + /* ensure that SIGCHLD is unblocked as we need to capture it */ + if (0 != sigemptyset(&unblock)) { + return ORTE_ERROR; + } + if (0 != sigaddset(&unblock, SIGCHLD)) { + return ORTE_ERROR; + } + if (0 != sigprocmask(SIG_UNBLOCK, &unblock, NULL)) { + return ORTE_ERR_NOT_SUPPORTED; + } + /* check if the user requested that we display output in xterms */ if (NULL != orte_xterm) { /* construct a list of ranks to be displayed */