Imported from ../bash-3.2.tar.gz.

This commit is contained in:
Jari Aalto
2006-10-10 14:15:34 +00:00
parent 95732b497d
commit 0628567a28
182 changed files with 17647 additions and 9477 deletions

View File

@@ -532,6 +532,7 @@ main (argc, argv, env)
Variables from the environment are expected to be set, etc. */
shell_initialize ();
set_default_lang ();
set_default_locale_vars ();
if (interactive_shell)
@@ -1208,7 +1209,7 @@ run_wordexp (words)
wl = global_command->value.Simple->words;
if (protected_mode)
for (tl = wl; tl; tl = tl->next)
tl->word->flags |= W_NOCOMSUB;
tl->word->flags |= W_NOCOMSUB|W_NOPROCSUB;
result = wl ? expand_words_no_vars (wl) : (WORD_LIST *)0;
}
else
@@ -1533,9 +1534,10 @@ set_shell_name (argv0)
any startup files; just try to be more like /bin/sh. */
shell_name = argv0 ? base_pathname (argv0) : PROGRAM;
if (*shell_name == '-')
if (argv0 && *argv0 == '-')
{
shell_name++;
if (*shell_name == '-')
shell_name++;
login_shell++;
}