summaryrefslogtreecommitdiff
path: root/builtins/evalstring.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-12-07 09:30:10 -0500
committerChet Ramey <chet.ramey@case.edu>2011-12-07 09:30:10 -0500
commit3abf178f91c942a6b8fbab5b81374ed29d5108f7 (patch)
treeb264b6e49d635f6ed81bbd733515f56c71d744e9 /builtins/evalstring.c
parente77a3058b64e2135ee0b1f244a7ce412a912f23c (diff)
downloadbash-3abf178f91c942a6b8fbab5b81374ed29d5108f7.tar.gz
commit bash-20081009 snapshot
Diffstat (limited to 'builtins/evalstring.c')
-rw-r--r--builtins/evalstring.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtins/evalstring.c b/builtins/evalstring.c
index 657c98d1..13523c0f 100644
--- a/builtins/evalstring.c
+++ b/builtins/evalstring.c
@@ -266,6 +266,7 @@ parse_and_execute (string, from_file, flags)
* parse_and_execute has not been called recursively AND
* we're not running a trap AND
* we have parsed the full command (string == '\0') AND
+ * we're not going to run the exit trap AND
* we have a simple command without redirections AND
* the command is not being timed AND
* the command's return status is not being inverted
@@ -276,7 +277,8 @@ parse_and_execute (string, from_file, flags)
running_trap == 0 &&
*bash_input.location.string == '\0' &&
command->type == cm_simple &&
- !command->redirects && !command->value.Simple->redirects &&
+ signal_is_trapped (EXIT_TRAP) == 0 &&
+ command->redirects == 0 && command->value.Simple->redirects == 0 &&
((command->flags & CMD_TIME_PIPELINE) == 0) &&
((command->flags & CMD_INVERT_RETURN) == 0))
{