Merge pull request #8071 from wzamazon/v4.1.x_fix_oob_tcp
oob/tcp: fix a race condition on stop_thread pipe
Этот коммит содержится в:
Коммит
51dc13d9b8
@ -695,6 +695,9 @@ static void component_shutdown(void)
|
||||
/* tell the thread to exit */
|
||||
write(mca_oob_tcp_component.stop_thread[1], &i, sizeof(int));
|
||||
opal_thread_join(&mca_oob_tcp_component.listen_thread, NULL);
|
||||
|
||||
close(mca_oob_tcp_component.stop_thread[0]);
|
||||
close(mca_oob_tcp_component.stop_thread[1]);
|
||||
} else {
|
||||
opal_output_verbose(2, orte_oob_base_framework.framework_output,
|
||||
"no hnp or not active");
|
||||
|
@ -705,8 +705,6 @@ static void* listen_thread(opal_object_t *obj)
|
||||
rc = select(max + 1, &readfds, NULL, NULL, &timeout);
|
||||
if (!mca_oob_tcp_component.listen_thread_active) {
|
||||
/* we've been asked to terminate */
|
||||
close(mca_oob_tcp_component.stop_thread[0]);
|
||||
close(mca_oob_tcp_component.stop_thread[1]);
|
||||
return NULL;
|
||||
}
|
||||
if (rc < 0) {
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user