[mpich2-commits] r4076 - mpich2/trunk/src/pm/hydra/pm/central

balaji at mcs.anl.gov balaji at mcs.anl.gov
Sat Mar 14 23:02:00 CDT 2009


Author: balaji
Date: 2009-03-14 23:02:00 -0500 (Sat, 14 Mar 2009)
New Revision: 4076

Modified:
   mpich2/trunk/src/pm/hydra/pm/central/proxy_utils.c
Log:
Fixed one more bug in the environment passing code. Some bootstrap
servers (shell-based, such as ssh) automatically remove the quotes
from the environment strings, while some servers don't (e.g.,
fork). We need to explicitly check for this.


Modified: mpich2/trunk/src/pm/hydra/pm/central/proxy_utils.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/central/proxy_utils.c	2009-03-15 03:35:41 UTC (rev 4075)
+++ mpich2/trunk/src/pm/hydra/pm/central/proxy_utils.c	2009-03-15 04:02:00 UTC (rev 4076)
@@ -12,7 +12,7 @@
 HYD_Status HYD_Proxy_get_params(int t_argc, char **t_argv)
 {
     int argc = t_argc;
-    char **argv = t_argv;
+    char **argv = t_argv, *str;
     int arg, i, count;
     struct HYD_Partition_list *partition, *run;
     HYD_Status status = HYD_SUCCESS;
@@ -86,7 +86,16 @@
             count = atoi(*argv);
             for (i = 0; i < count; i++) {
                 argv++;
-                HYDU_Env_putenv(*argv);
+                str = *argv;
+
+                /* Some bootstrap servers remove the quotes that we
+                 * added, while some others do not. For the cases
+                 * where they are not removed, we do it ourselves. */
+                if (*str == '"') {
+                    str++;
+                    str[strlen(str)-1] = 0;
+                }
+                HYDU_Env_putenv(str);
             }
             continue;
         }



More information about the mpich2-commits mailing list