summaryrefslogtreecommitdiff
path: root/builtins/evalstring.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtins/evalstring.c')
-rw-r--r--builtins/evalstring.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtins/evalstring.c b/builtins/evalstring.c
index 37516bb6..21e4772e 100644
--- a/builtins/evalstring.c
+++ b/builtins/evalstring.c
@@ -175,7 +175,7 @@ parse_and_execute (string, from_file, flags)
case DISCARD:
run_unwind_frame ("pe_dispose");
- last_command_exit_value = 1; /* XXX */
+ last_result = last_command_exit_value = EXECUTION_FAILURE; /* XXX */
if (subshell_environment)
{
should_jump_to_top_level = 1;
@@ -238,7 +238,7 @@ parse_and_execute (string, from_file, flags)
/* See if this is a candidate for $( <file ). */
if (startup_state == 2 &&
- subshell_environment == SUBSHELL_COMSUB &&
+ (subshell_environment & SUBSHELL_COMSUB) &&
*bash_input.location.string == '\0' &&
command->type == cm_simple && !command->redirects &&
(command->flags & CMD_TIME_PIPELINE) == 0 &&
@@ -277,8 +277,8 @@ parse_and_execute (string, from_file, flags)
if (interrupt_state && parse_and_execute_level == 0)
{
/* An interrupt during non-interactive execution in an
- interactive shell (e.g. via $PROMPT_COMMAND) should
- not cause the shell to exit. */
+ interactive shell (e.g. via $PROMPT_COMMAND) should
+ not cause the shell to exit. */
interactive = interactive_shell;
throw_to_top_level ();
}