mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-11 20:50:42 +02:00
commit bash-20150918 snapshot
This commit is contained in:
@@ -573,10 +573,14 @@ itrace("parse_string: longjmp executed: code = %d", code);
|
||||
|
||||
run_unwind_frame (PS_TAG);
|
||||
|
||||
/* If we return < 0, the caller (xparse_dolparen) will jump_to_top_level for
|
||||
us, after doing cleanup */
|
||||
if (should_jump_to_top_level)
|
||||
{
|
||||
if (parse_and_execute_level == 0)
|
||||
top_level_cleanup ();
|
||||
if (code == DISCARD)
|
||||
return -DISCARD;
|
||||
jump_to_top_level (code);
|
||||
}
|
||||
|
||||
|
||||
+8
-1
@@ -142,6 +142,7 @@ exec_builtin (list)
|
||||
#endif /* RESTRICTED_SHELL */
|
||||
|
||||
args = strvec_from_word_list (list, 1, 0, (int *)NULL);
|
||||
env = (char **)0;
|
||||
|
||||
/* A command with a slash anywhere in its name is not looked up in $PATH. */
|
||||
command = absolute_program (args[0]) ? args[0] : search_for_command (args[0], 1);
|
||||
@@ -193,7 +194,10 @@ exec_builtin (list)
|
||||
adjust_shell_level (-1);
|
||||
|
||||
if (cleanenv)
|
||||
env = (char **)NULL;
|
||||
{
|
||||
env = strvec_create (1);
|
||||
env[0] = (char *)0;
|
||||
}
|
||||
else
|
||||
{
|
||||
maybe_make_export_env ();
|
||||
@@ -242,6 +246,9 @@ failed_exec:
|
||||
if (args)
|
||||
strvec_dispose (args);
|
||||
|
||||
if (env && env != export_env)
|
||||
strvec_dispose (env);
|
||||
|
||||
initialize_traps ();
|
||||
initialize_signals (1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user