commit bash-20190612 snapshot

This commit is contained in:
Chet Ramey
2019-06-14 09:31:42 -04:00
parent 653d7134f8
commit f602910792
24 changed files with 1256 additions and 1099 deletions
+17 -1
View File
@@ -1,6 +1,6 @@
/* variables.c -- Functions for hacking shell variables. */
/* Copyright (C) 1987-2018 Free Software Foundation, Inc.
/* Copyright (C) 1987-2019 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -229,6 +229,10 @@ static SHELL_VAR *get_epochrealtime __P((SHELL_VAR *));
static SHELL_VAR *get_bashpid __P((SHELL_VAR *));
static SHELL_VAR *get_bash_argv0 __P((SHELL_VAR *));
static SHELL_VAR *assign_bash_argv0 __P((SHELL_VAR *, char *, arrayind_t, char *));
static void set_argv0 __P((void));
#if defined (HISTORY)
static SHELL_VAR *get_histcmd __P((SHELL_VAR *));
#endif
@@ -554,6 +558,8 @@ initialize_shell_variables (env, privmode)
set_ppid ();
set_argv0 ();
/* Initialize the `getopts' stuff. */
temp_var = bind_variable ("OPTIND", "1", 0);
VSETATTR (temp_var, att_integer);
@@ -1695,6 +1701,16 @@ assign_bash_argv0 (var, value, unused, key)
shell_name = static_shell_name;
return var;
}
static void
set_argv0 ()
{
SHELL_VAR *v;
v = find_variable ("BASH_ARGV0");
if (v && imported_p (v))
assign_bash_argv0 (v, value_cell (v), 0, 0);
}
static SHELL_VAR *
get_bash_command (var)