diff options
| author | Chet Ramey <chet.ramey@case.edu> | 2011-12-03 13:44:37 -0500 |
|---|---|---|
| committer | Chet Ramey <chet.ramey@case.edu> | 2011-12-03 13:44:37 -0500 |
| commit | af91506ad6aba8644310bb5825904c54599cb07a (patch) | |
| tree | f922fba16bb95d8a011b73786d6ea96ce7a3e173 /builtins/evalstring.c | |
| parent | e624d0f7bb1cc8adb09a1a2c1e034d694f7e54f0 (diff) | |
| download | bash-af91506ad6aba8644310bb5825904c54599cb07a.tar.gz | |
commit bash-20050310 snapshot
Diffstat (limited to 'builtins/evalstring.c')
| -rw-r--r-- | builtins/evalstring.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtins/evalstring.c b/builtins/evalstring.c index 88d6a9e5..f9e16134 100644 --- a/builtins/evalstring.c +++ b/builtins/evalstring.c @@ -233,7 +233,8 @@ parse_and_execute (string, from_file, flags) * parse_and_execute has not been called recursively AND * we have parsed the full command (string == '\0') AND * we have a simple command without redirections AND - * the command is not being timed + * the command is not being timed AND + * the command's return status is not being inverted * THEN * tell the execution code that we don't need to fork */ @@ -241,7 +242,8 @@ parse_and_execute (string, from_file, flags) *bash_input.location.string == '\0' && command->type == cm_simple && !command->redirects && !command->value.Simple->redirects && - ((command->flags & CMD_TIME_PIPELINE) == 0)) + ((command->flags & CMD_TIME_PIPELINE) == 0) && + ((command->flags & CMD_INVERT_RETURN) == 0)) { command->flags |= CMD_NO_FORK; command->value.Simple->flags |= CMD_NO_FORK; |
