File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 2828#include "orte/constants.h"
2929
3030#include <string.h>
31+ #include <signal.h>
3132
3233#include "opal/class/opal_ring_buffer.h"
3334#include "orte/mca/mca.h"
@@ -140,6 +141,7 @@ static int orte_odls_base_open(mca_base_open_flag_t flags)
140141 int rc , i , rank ;
141142 orte_namelist_t * nm ;
142143 bool xterm_hold ;
144+ sigset_t unblock ;
143145
144146 /* initialize the global array of local children */
145147 orte_local_children = OBJ_NEW (opal_pointer_array_t );
@@ -155,6 +157,17 @@ static int orte_odls_base_open(mca_base_open_flag_t flags)
155157 OBJ_CONSTRUCT (& orte_odls_globals .xterm_ranks , opal_list_t );
156158 orte_odls_globals .xtermcmd = NULL ;
157159
160+ /* ensure that SIGCHLD is unblocked as we need to capture it */
161+ if (0 != sigemptyset (& unblock )) {
162+ return ORTE_ERROR ;
163+ }
164+ if (0 != sigaddset (& unblock , SIGCHLD )) {
165+ return ORTE_ERROR ;
166+ }
167+ if (0 != sigprocmask (SIG_UNBLOCK , & unblock , NULL )) {
168+ return ORTE_ERR_NOT_SUPPORTED ;
169+ }
170+
158171 /* check if the user requested that we display output in xterms */
159172 if (NULL != orte_xterm ) {
160173 /* construct a list of ranks to be displayed */
You can’t perform that action at this time.
0 commit comments