Ensure SIGCHLD is unblocked
Thanks to @hjelmn for debugging it and providing the patch Signed-off-by: Ralph Castain <rhc@open-mpi.org> (cherry picked from commit efa8bcc17078c89f1c9d6aabed35c90973a469bf) (cherry picked from commit 647a760b7e24194b37571a8245d8d39ed202e75b) Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
Этот коммит содержится в:
родитель
e2cf1e3ec5
Коммит
05e0545581
@ -28,6 +28,7 @@
|
|||||||
#include "orte/constants.h"
|
#include "orte/constants.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
#include "opal/class/opal_ring_buffer.h"
|
#include "opal/class/opal_ring_buffer.h"
|
||||||
#include "orte/mca/mca.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;
|
int rc, i, rank;
|
||||||
orte_namelist_t *nm;
|
orte_namelist_t *nm;
|
||||||
bool xterm_hold;
|
bool xterm_hold;
|
||||||
|
sigset_t unblock;
|
||||||
|
|
||||||
ORTE_CONSTRUCT_LOCK(&orte_odls_globals.lock);
|
ORTE_CONSTRUCT_LOCK(&orte_odls_globals.lock);
|
||||||
orte_odls_globals.lock.active = false; // start with nobody having the thread
|
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);
|
OBJ_CONSTRUCT(&orte_odls_globals.xterm_ranks, opal_list_t);
|
||||||
orte_odls_globals.xtermcmd = NULL;
|
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 */
|
/* check if the user requested that we display output in xterms */
|
||||||
if (NULL != orte_xterm) {
|
if (NULL != orte_xterm) {
|
||||||
/* construct a list of ranks to be displayed */
|
/* construct a list of ranks to be displayed */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user