diff --git a/orte/mca/odls/base/odls_base_frame.c b/orte/mca/odls/base/odls_base_frame.c index f4beb709b1..48c7702e60 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" @@ -225,6 +226,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 @@ -243,6 +245,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 */