File tree 2 files changed +13
-3
lines changed
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)
572
572
memset (orted_uri , 0 , buffer_length );
573
573
574
574
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
+ }
575
581
/* we read an entire buffer - better get more */
576
582
num_chars_read += chunk ;
577
583
orted_uri = realloc ((void * )orted_uri , buffer_length + ORTE_URI_MSG_LGTH );
Original file line number Diff line number Diff line change 60
60
#include "opal/util/os_path.h"
61
61
#include "opal/util/printf.h"
62
62
#include "opal/util/argv.h"
63
+ #include "opal/util/fd.h"
63
64
#include "opal/runtime/opal.h"
64
65
#include "opal/mca/base/mca_base_var.h"
65
66
#include "opal/util/daemon_init.h"
@@ -598,8 +599,8 @@ int orte_daemon(int argc, char *argv[])
598
599
}
599
600
/* use setup fork to create the envars needed by the singleton */
600
601
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 ;
603
604
}
604
605
605
606
/* append the transport key to the envars needed by the singleton */
@@ -620,7 +621,10 @@ int orte_daemon(int argc, char *argv[])
620
621
free (nptr );
621
622
622
623
/* 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
+ }
624
628
625
629
/* cleanup */
626
630
free (tmp );
You can’t perform that action at this time.
0 commit comments