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 28
28
#include "orte/constants.h"
29
29
30
30
#include <string.h>
31
+ #include <signal.h>
31
32
32
33
#include "opal/class/opal_ring_buffer.h"
33
34
#include "orte/mca/mca.h"
@@ -226,6 +227,7 @@ static int orte_odls_base_open(mca_base_open_flag_t flags)
226
227
int rc , i , rank ;
227
228
orte_namelist_t * nm ;
228
229
bool xterm_hold ;
230
+ sigset_t unblock ;
229
231
230
232
ORTE_CONSTRUCT_LOCK (& orte_odls_globals .lock );
231
233
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)
244
246
OBJ_CONSTRUCT (& orte_odls_globals .xterm_ranks , opal_list_t );
245
247
orte_odls_globals .xtermcmd = NULL ;
246
248
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
+
247
260
/* check if the user requested that we display output in xterms */
248
261
if (NULL != orte_xterm ) {
249
262
/* construct a list of ranks to be displayed */
You can’t perform that action at this time.
0 commit comments