Skip to content

Commit a9227f6

Browse files
ggouaillardetRalph Castain
authored andcommitted
ess/singleton: expects 4 PMIX_* environment variables or more
(cherry picked from commit a1e8e58)
1 parent f5ad91b commit a9227f6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

orte/mca/ess/singleton/ess_singleton_module.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
1616
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
1717
* reserved.
18+
* Copyright (c) 2016 Research Organization for Information Science
19+
* and Technology (RIST). All rights reserved.
1820
* $COPYRIGHT$
1921
*
2022
* Additional copyrights may follow
@@ -546,6 +548,8 @@ static int fork_hnp(void)
546548
exit(1);
547549

548550
} else {
551+
int count;
552+
549553
free(cmd);
550554
/* I am the parent - wait to hear something back and
551555
* report results
@@ -612,12 +616,13 @@ static int fork_hnp(void)
612616

613617
/* split the pmix_uri into its parts */
614618
argv = opal_argv_split(cptr, ',');
615-
if (4 != opal_argv_count(argv)) {
619+
count = opal_argv_count(argv);
620+
if (4 > count) {
616621
opal_argv_free(argv);
617622
return ORTE_ERR_BAD_PARAM;
618623
}
619624
/* push each piece into the environment */
620-
for (i=0; i < 4; i++) {
625+
for (i=0; i < count; i++) {
621626
pmixenvars[i] = strdup(argv[i]);
622627
putenv(pmixenvars[i]);
623628
}

0 commit comments

Comments
 (0)