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"
@@ -226,6 +227,7 @@ static int orte_odls_base_open(mca_base_open_flag_t flags)
226227 int rc , i , rank ;
227228 orte_namelist_t * nm ;
228229 bool xterm_hold ;
230+ sigset_t unblock ;
229231
230232 ORTE_CONSTRUCT_LOCK (& orte_odls_globals .lock );
231233 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)
244246 OBJ_CONSTRUCT (& orte_odls_globals .xterm_ranks , opal_list_t );
245247 orte_odls_globals .xtermcmd = NULL ;
246248
249+ /* ensure that SIGCHLD is unblocked as we need to capture it */
250+ if (0 != sigemptyset (& unblock )) {
251+ return ORTE_ERROR ;
252+ }
253+ if (0 != sigaddset (& unblock , SIGCHLD )) {
254+ return ORTE_ERROR ;
255+ }
256+ if (0 != sigprocmask (SIG_UNBLOCK , & unblock , NULL )) {
257+ return ORTE_ERR_NOT_SUPPORTED ;
258+ }
259+
247260 /* check if the user requested that we display output in xterms */
248261 if (NULL != orte_xterm ) {
249262 /* construct a list of ranks to be displayed */
You can’t perform that action at this time.
0 commit comments