Imported from ../bash-3.2.tar.gz.
This commit is contained in:
8
shell.c
8
shell.c
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user