* function.c (windows32_openpipe): Update envp after calling
authorEli Zaretskii <eliz@gnu.org>
Mon, 31 Aug 2009 17:54:11 +0000 (17:54 +0000)
committerEli Zaretskii <eliz@gnu.org>
Mon, 31 Aug 2009 17:54:11 +0000 (17:54 +0000)
sync_Path_environment.

ChangeLog
function.c

index 26abd12788c521386530cd927d6067e56b0b3e42..0a6c5b231c5ab5eb7e2403cb12530a516f22964a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-31  Eli Zaretskii  <eliz@gnu.org>
+
+       * function.c (windows32_openpipe): Update envp after calling
+       sync_Path_environment.
+
 2009-08-01  Paul Smith  <psmith@gnu.org>
 
        * expand.c (expand_argument): If the argument is large enough use
index c7e1d4fe4985a82f7788a5e8218735f547a947ba..2e6d5cb221e75943bb914bffbaa9c08dbdf174e6 100644 (file)
@@ -1480,6 +1480,9 @@ windows32_openpipe (int *pipedes, int *pid_p, char **command_argv, char **envp)
 
   /* make sure that CreateProcess() has Path it needs */
   sync_Path_environment();
+  /* `sync_Path_environment' may realloc `environ', so take note of
+     the new value.  */
+  envp = environ;
 
   if (!process_begin(hProcess, command_argv, envp, command_argv[0], NULL)) {
     /* register process for wait */