changeset 83799:6aa4d1effd67

(set_initial_environment): Set Vinitial_environment only when Vprocess_environment is built, otherwise I get an unexplained infinite loop. (child_setup): Remove unused vars term_var and display_var.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 31 Aug 2007 05:22:22 +0000
parents b797bea42060
children 0505ccaa9eba
files src/callproc.c
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/callproc.c	Fri Aug 31 04:43:18 2007 +0000
+++ b/src/callproc.c	Fri Aug 31 05:22:22 2007 +0000
@@ -1245,8 +1245,6 @@
 {
   char **env;
   char *pwd_var;
-  char *term_var;
-  char *display_var;
 #ifdef WINDOWSNT
   int cpid;
   HANDLE handles[3];
@@ -1818,7 +1816,6 @@
 set_initial_environment ()
 {
   register char **envp;
-  Lisp_Object env = Vprocess_environment;
 #ifndef CANNOT_DUMP
   if (initialized)
 #endif
@@ -1827,10 +1824,10 @@
 	Vprocess_environment = Fcons (build_string (*envp),
 				      Vprocess_environment);
       store_frame_param (SELECTED_FRAME(), Qenvironment, Vprocess_environment);
+      /* Ideally, the `copy' shouldn't be necessary, but it seems it's frequent
+	 to use `delete' and friends on process-environment.  */
+      Vinitial_environment = Fcopy_sequence (Vprocess_environment);
     }
-  /* Ideally, the `copy' shouldn't be necessary, but it seems it's frequent
-     to use `delete' and friends on process-environment.  */
-  Vinitial_environment = Fcopy_sequence (Vprocess_environment);
 }
 
 void