Skip to content

Commit a1e8e58

Browse files
committed
ess/singleton: expects 4 PMIX_* environment variables or more
1 parent 696121c commit a1e8e58

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-2016 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
@@ -564,6 +566,8 @@ static int fork_hnp(void)
564566
exit(1);
565567

566568
} else {
569+
int count;
570+
567571
free(cmd);
568572
/* I am the parent - wait to hear something back and
569573
* report results
@@ -630,12 +634,13 @@ static int fork_hnp(void)
630634

631635
/* split the pmix_uri into its parts */
632636
argv = opal_argv_split(cptr, ',');
633-
if (4 != opal_argv_count(argv)) {
637+
count = opal_argv_count(argv);
638+
if (4 > count) {
634639
opal_argv_free(argv);
635640
return ORTE_ERR_BAD_PARAM;
636641
}
637642
/* push each piece into the environment */
638-
for (i=0; i < 4; i++) {
643+
for (i=0; i < count; i++) {
639644
pmixenvars[i] = strdup(argv[i]);
640645
putenv(pmixenvars[i]);
641646
}

0 commit comments

Comments
 (0)