diff options
Diffstat (limited to 'execute_cmd.c')
| -rw-r--r-- | execute_cmd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/execute_cmd.c b/execute_cmd.c index 1f5c9e2e..76ea96fb 100644 --- a/execute_cmd.c +++ b/execute_cmd.c @@ -819,6 +819,8 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, if (asynchronous) { DESCRIBE_PID (last_made_pid); + exec_result = EXECUTION_SUCCESS; + invert = 0; /* async commands always succeed */ } else #if !defined (JOB_CONTROL) @@ -958,6 +960,9 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, case cm_connection: exec_result = execute_connection (command, asynchronous, pipe_in, pipe_out, fds_to_close); + if (asynchronous) + invert = 0; /* XXX */ + break; #if defined (DPAREN_ARITHMETIC) @@ -2542,6 +2547,12 @@ execute_connection (command, asynchronous, pipe_in, pipe_out, fds_to_close) line_number_for_err_trap = line_number; exec_result = execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close); + if (asynchronous) + { + exec_result = EXECUTION_SUCCESS; + invert = 0; + } + if (was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS) { last_command_exit_value = exec_result; |
