Skip to content

Commit

Permalink
Fix handling of "--" in cmd line
Browse files Browse the repository at this point in the history
Allow the app parser to see the line and rely on
the PMIx cmd line parser to handle it.

Signed-off-by: Ralph Castain <rhc@pmix.org>
  • Loading branch information
rhc54 committed Nov 18, 2023
1 parent 2835e09 commit 81b4e60
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/prted/prte_app_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ int prte_parse_locals(prte_schizo_base_module_t *schizo,
char **temp_argv, **env;
prte_pmix_app_t *app;
bool made_app;
bool ddash = false;

/* Make the apps */
temp_argv = NULL;
Expand All @@ -348,13 +347,6 @@ int prte_parse_locals(prte_schizo_base_module_t *schizo,

env = NULL;
for (i = 1; NULL != argv[i]; ++i) {
// if this is a `--`, then everything beyond it
// belongs to the application
if (0 == strcmp(argv[i], "--")) {
ddash = true;
++i;
break;
}
if (0 == strcmp(argv[i], ":")) {
/* Make an app with this argv */
if (PMIX_ARGV_COUNT_COMPAT(temp_argv) > 1) {
Expand Down Expand Up @@ -394,13 +386,9 @@ int prte_parse_locals(prte_schizo_base_module_t *schizo,
}
if (made_app) {
pmix_list_append(jdata, &app->super);
if (ddash && NULL != argv[i]) {
for (j=i; NULL != argv[j]; j++) {
PMIX_ARGV_APPEND_NOSIZE_COMPAT(&app->app.argv, argv[j]);
}
}
}
}

if (NULL != env) {
PMIX_ARGV_FREE_COMPAT(env);
}
Expand Down

0 comments on commit 81b4e60

Please sign in to comment.