oob_tcp_listener.c: set both ends of this thread to be close-on-exec
This pipe is used to communicate between threads in this process. Mark both fd as close-on-exec so that children don't inherit this pipe. Refs trac:4550 This commit was SVN r31512. The following Trac tickets were found above: Ticket 4550 --> https://svn.open-mpi.org/trac/ompi/ticket/4550
Этот коммит содержится в:
родитель
67bb0c261a
Коммит
410f5bfb91
@ -129,6 +129,17 @@ int orte_oob_tcp_start_listening(void)
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
/* Make sure the pipe FDs are set to close-on-exec so that
|
||||
they don't leak into children */
|
||||
if (fcntl(mca_oob_tcp_component.stop_thread[0], F_SETFD, FD_CLOEXEC) == -1 ||
|
||||
fcntl(mca_oob_tcp_component.stop_thread[1], F_SETFD, FD_CLOEXEC) == -1) {
|
||||
close(mca_oob_tcp_component.stop_thread[0]);
|
||||
close(mca_oob_tcp_component.stop_thread[1]);
|
||||
ORTE_ERROR_LOG(ORTE_ERR_IN_ERRNO);
|
||||
return ORTE_ERR_IN_ERRNO;
|
||||
}
|
||||
|
||||
mca_oob_tcp_component.listen_thread_active = true;
|
||||
mca_oob_tcp_component.listen_thread.t_run = listen_thread;
|
||||
mca_oob_tcp_component.listen_thread.t_arg = NULL;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user