summaryrefslogtreecommitdiff
path: root/subst.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-12-07 09:27:13 -0500
committerChet Ramey <chet.ramey@case.edu>2011-12-07 09:27:13 -0500
commit2e4498b3aaccbc2618e74f1101abafed96a6bf19 (patch)
tree8107bcc0806ce04ee3dada85e8c9da0f55e34331 /subst.c
parentbea29b7b393f6819ada3b9879d43fa803518863b (diff)
downloadbash-2e4498b3aaccbc2618e74f1101abafed96a6bf19.tar.gz
commit bash-20080814 snapshot
Diffstat (limited to 'subst.c')
-rw-r--r--subst.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/subst.c b/subst.c
index 8e15004a..4ec73db2 100644
--- a/subst.c
+++ b/subst.c
@@ -8,19 +8,19 @@
This file is part of GNU Bash, the Bourne Again SHell.
- Bash is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 2, or (at your option) any later
- version.
-
- Bash is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License along
- with Bash; see the file COPYING. If not, write to the Free Software
- Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
#include "config.h"
@@ -134,7 +134,7 @@ int assigning_in_environment;
/* Extern functions and variables from different files. */
extern int last_command_exit_value, last_command_exit_signal;
extern int subshell_environment;
-extern int subshell_level;
+extern int subshell_level, parse_and_execute_level;
extern int eof_encountered;
extern int return_catch_flag, return_catch_value;
extern pid_t dollar_dollar_pid;
@@ -8091,7 +8091,9 @@ exp_jump_to_top_level (v)
expanding_redir = 0;
assigning_in_environment = 0;
- top_level_cleanup (); /* from sig.c */
+ if (parse_and_execute_level == 0)
+ top_level_cleanup (); /* from sig.c */
+
jump_to_top_level (v);
}