Imported from ../bash-2.05b.tar.gz.
[platform/upstream/bash.git] / eval.c
diff --git a/eval.c b/eval.c
index b9572b9..9908f22 100644 (file)
--- a/eval.c
+++ b/eval.c
@@ -52,6 +52,9 @@ extern int need_here_doc;
 extern int current_command_number, current_command_line_count, line_number;
 extern int expand_aliases;
 
+static void send_pwd_to_eterm __P((void));
+static sighandler alrm_catcher __P((int));
+
 /* Read and execute commands until EOF is reached.  This assumes that
    the input source has already been initialized. */
 int
@@ -114,7 +117,8 @@ reader_loop ()
        }
 
       executing = 0;
-      dispose_used_env_vars ();
+      if (temporary_env)
+       dispose_used_env_vars ();
 
 #if (defined (ultrix) && defined (mips)) || defined (C_ALLOCA)
       /* Attempt to reclaim memory allocated with alloca (). */
@@ -240,9 +244,9 @@ read_command ()
     {
       tmout_var = find_variable ("TMOUT");
 
-      if (tmout_var && tmout_var->value)
+      if (tmout_var && var_isset (tmout_var))
        {
-         tmout_len = atoi (tmout_var->value);
+         tmout_len = atoi (value_cell (tmout_var));
          if (tmout_len > 0)
            {
              old_alrm = set_signal_handler (SIGALRM, alrm_catcher);