mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-07 02:32:27 +02:00
commit bash-20150918 snapshot
This commit is contained in:
+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