1
1

Update the odls/alps component

Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
Ralph Castain 2017-11-25 19:51:07 -08:00
родитель 3906aaf41a
Коммит e3c308dfc8

Просмотреть файл

@ -333,7 +333,11 @@ static int close_open_file_descriptors(int write_fd, orte_iof_base_io_conf_t opt
(fd == alps_app_filedes[0]) ||
(fd == alps_app_filedes[1])) continue;
if (fd >=3 && fd != opts.p_internal[1] && fd != write_fd) {
if (fd >=3 &&
#if OPAL_PMIX_V1
fd != opts.p_internal[1] &&
#endif
fd != write_fd) {
close(fd);
}
}
@ -386,11 +390,13 @@ static int do_child(orte_odls_spawn_caddy_t *cd, int write_fd)
}
close(fdnull);
}
#if OPAL_PMIX_V1
fdnull = open("/dev/null", O_RDONLY, 0);
if (fdnull > cd->opts.p_internal[1]) {
dup2(fdnull, cd->opts.p_internal[1]);
}
close(fdnull);
#endif
}
if (ORTE_SUCCESS != close_open_file_descriptors(write_fd, cd->opts)) {
@ -475,7 +481,9 @@ static int do_parent(orte_odls_spawn_caddy_t *cd, int read_fd)
if( !orte_iof_base.redirect_app_stderr_to_stdout ) {
close(cd->opts.p_stderr[1]);
}
#if OPAL_PMIX_V1
close(cd->opts.p_internal[1]);
#endif
/* Block reading a message from the pipe */
while (1) {