mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-29 16:39:53 +02:00
commit bash-20140307 snapshot
This commit is contained in:
+6
-1
@@ -286,6 +286,8 @@ int line_number_for_err_trap;
|
||||
int funcnest = 0;
|
||||
int funcnest_max = 0; /* bash-4.2 */
|
||||
|
||||
volatile int from_return_trap = 0;
|
||||
|
||||
int lastpipe_opt = 0;
|
||||
|
||||
struct fd_bitmap *current_fds_to_close = (struct fd_bitmap *)NULL;
|
||||
@@ -4502,6 +4504,8 @@ execute_function (var, words, flags, fds_to_close, async, subshell)
|
||||
|
||||
fc = tc;
|
||||
|
||||
from_return_trap = 0;
|
||||
|
||||
return_catch_flag++;
|
||||
return_val = setjmp_nosigs (return_catch);
|
||||
|
||||
@@ -4510,7 +4514,8 @@ execute_function (var, words, flags, fds_to_close, async, subshell)
|
||||
result = return_catch_value;
|
||||
/* Run the RETURN trap in the function's context. */
|
||||
save_current = currently_executing_command;
|
||||
run_return_trap ();
|
||||
if (from_return_trap == 0)
|
||||
run_return_trap ();
|
||||
currently_executing_command = save_current;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user