mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-04 10:50:50 +02:00
commit bash-20090813 snapshot
This commit is contained in:
@@ -883,9 +883,29 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
|
||||
|
||||
#if defined (DPAREN_ARITHMETIC)
|
||||
case cm_arith:
|
||||
was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0;
|
||||
if (ignore_return)
|
||||
command->value.Arith->flags |= CMD_IGNORE_RETURN;
|
||||
line_number_for_err_trap = save_line_number = line_number;
|
||||
exec_result = execute_arith_command (command->value.Arith);
|
||||
line_number = save_line_number;
|
||||
|
||||
if (was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS)
|
||||
{
|
||||
last_command_exit_value = exec_result;
|
||||
save_line_number = line_number;
|
||||
line_number = line_number_for_err_trap;
|
||||
run_error_trap ();
|
||||
line_number = save_line_number;
|
||||
}
|
||||
|
||||
if (ignore_return == 0 && invert == 0 && exit_immediately_on_error && exec_result != EXECUTION_SUCCESS)
|
||||
{
|
||||
last_command_exit_value = exec_result;
|
||||
run_pending_traps ();
|
||||
jump_to_top_level (ERREXIT);
|
||||
}
|
||||
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user