From 031f687e5a8b2f43674fdeba5f20ecd3bcf610e2 Mon Sep 17 00:00:00 2001 From: Tim Woodall Date: Fri, 20 May 2005 19:33:22 +0000 Subject: [PATCH] - global debug parameter was renamed to orte_debug - pass an environment through to app/ssh session This commit was SVN r5799. --- src/mca/pls/rsh/pls_rsh_component.c | 6 +++--- src/mca/pls/rsh/pls_rsh_module.c | 12 ++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/mca/pls/rsh/pls_rsh_component.c b/src/mca/pls/rsh/pls_rsh_component.c index 1629e0d444..efc0095566 100644 --- a/src/mca/pls/rsh/pls_rsh_component.c +++ b/src/mca/pls/rsh/pls_rsh_component.c @@ -128,7 +128,7 @@ int orte_pls_rsh_component_open(void) mca_pls_rsh_component.debug = orte_pls_rsh_param_register_int("debug",0); mca_pls_rsh_component.num_concurrent = orte_pls_rsh_param_register_int("num_concurrent",128); if(mca_pls_rsh_component.debug == 0) { - int id = mca_base_param_register_int("debug",NULL,NULL,NULL,0); + int id = mca_base_param_register_int("orte","debug",NULL,NULL,0); int value; mca_base_param_lookup_int(id,&value); mca_pls_rsh_component.debug = (value > 0) ? 1 : 0; @@ -147,8 +147,8 @@ int orte_pls_rsh_component_open(void) automatically add "-x" */ bname = ompi_basename(mca_pls_rsh_component.argv[0]); - if (NULL != bname && 0 == strcmp(bname, "ssh") && - !mca_pls_rsh_component.debug) { + if (NULL != bname && 0 == strcmp(bname, "ssh") && + mca_pls_rsh_component.debug == 0) { for (i = 1; NULL != mca_pls_rsh_component.argv[i]; ++i) { if (0 == strcasecmp("-x", mca_pls_rsh_component.argv[i])) { break; diff --git a/src/mca/pls/rsh/pls_rsh_module.c b/src/mca/pls/rsh/pls_rsh_module.c index d0e6950819..b29ace1d3d 100644 --- a/src/mca/pls/rsh/pls_rsh_module.c +++ b/src/mca/pls/rsh/pls_rsh_module.c @@ -33,6 +33,7 @@ #include "include/orte_constants.h" #include "util/argv.h" +#include "util/ompi_environ.h" #include "util/output.h" #include "util/univ_info.h" #include "util/session_dir.h" @@ -385,6 +386,8 @@ int orte_pls_rsh_launch(orte_jobid_t jobid) /* child */ if(pid == 0) { char* name_string; + char** env; + char* var; /* Is this a local launch? */ if (ompi_ifislocal(node->node_name)) { @@ -406,7 +409,7 @@ int orte_pls_rsh_launch(orte_jobid_t jobid) if (mca_pls_rsh_component.debug > 2) { /* debug output */ char* cmd = ompi_argv_join(argv, ' '); - ompi_output(0, "orte_pls_rsh: %s\n", cmd); + ompi_output(0, "orte_pls_rsh: %s %s\n", exec_path, cmd); exit(0); } @@ -441,8 +444,13 @@ int orte_pls_rsh_launch(orte_jobid_t jobid) sigprocmask(0, 0, &sigs); sigprocmask(SIG_UNBLOCK, &sigs, 0); + /* setup environment */ + env = ompi_argv_copy(environ); + var = mca_base_param_environ_variable("seed",NULL,NULL); + ompi_setenv(var, "0", true, &env); + /* exec the daemon */ - execve(exec_path, exec_argv, NULL); + execve(exec_path, exec_argv, env); ompi_output(0, "orte_pls_rsh: execv failed with errno=%d\n", errno); exit(-1);