File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -572,6 +572,12 @@ static int fork_hnp(void)
572572 memset (orted_uri , 0 , buffer_length );
573573
574574 while (chunk == (rc = read (p [0 ], & orted_uri [num_chars_read ], chunk ))) {
575+ if (rc < 0 && (EAGAIN == errno || EINTR == errno )) {
576+ continue ;
577+ } else {
578+ num_chars_read = 0 ;
579+ break ;
580+ }
575581 /* we read an entire buffer - better get more */
576582 num_chars_read += chunk ;
577583 orted_uri = realloc ((void * )orted_uri , buffer_length + ORTE_URI_MSG_LGTH );
Original file line number Diff line number Diff line change 6060#include "opal/util/os_path.h"
6161#include "opal/util/printf.h"
6262#include "opal/util/argv.h"
63+ #include "opal/util/fd.h"
6364#include "opal/runtime/opal.h"
6465#include "opal/mca/base/mca_base_var.h"
6566#include "opal/util/daemon_init.h"
@@ -598,8 +599,8 @@ int orte_daemon(int argc, char *argv[])
598599 }
599600 /* use setup fork to create the envars needed by the singleton */
600601 if (OPAL_SUCCESS != (ret = opal_pmix .server_setup_fork (& proc -> name , & singenv ))) {
601- ORTE_ERROR_LOG (ret );
602- goto DONE ;
602+ ORTE_ERROR_LOG (ret );
603+ goto DONE ;
603604 }
604605
605606 /* append the transport key to the envars needed by the singleton */
@@ -620,7 +621,10 @@ int orte_daemon(int argc, char *argv[])
620621 free (nptr );
621622
622623 /* pass that info to the singleton */
623- write (orted_globals .uri_pipe , tmp , strlen (tmp )+ 1 ); /* need to add 1 to get the NULL */
624+ if (OPAL_SUCCESS != (ret = opal_fd_write (orted_globals .uri_pipe , strlen (tmp )+ 1 , tmp ))) { ; /* need to add 1 to get the NULL */
625+ ORTE_ERROR_LOG (ret );
626+ goto DONE ;
627+ }
624628
625629 /* cleanup */
626630 free (tmp );
You can’t perform that action at this time.
0 commit comments