From 3c33c79aaf91eb7ddd6abb247a99ee188495615f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 31 Aug 2007 05:22:22 +0000 Subject: [PATCH] (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. --- src/callproc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/callproc.c b/src/callproc.c index 66d11ff402c..d99dd8b90bb 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -1245,8 +1245,6 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir) { char **env; char *pwd_var; - char *term_var; - char *display_var; #ifdef WINDOWSNT int cpid; HANDLE handles[3]; @@ -1818,7 +1816,6 @@ void set_initial_environment () { register char **envp; - Lisp_Object env = Vprocess_environment; #ifndef CANNOT_DUMP if (initialized) #endif @@ -1827,10 +1824,10 @@ set_initial_environment () 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 -- 2.39.2