support to be compiled in or out.
aa. The new `globskipdots' shell option forces pathname expansion never to
- return `.' or `..' unless explicitly matched.
+ return `.' or `..' unless explicitly matched. It is enabled by default.
bb. Array references using `@' and `*' that are the value of nameref variables
(declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
support to be compiled in or out.
aa. The new `globskipdots' shell option forces pathname expansion never to
- return `.' or `..' unless explicitly matched.
+ return `.' or `..' unless explicitly matched. It is enabled by default.
bb. Array references using `@' and `*' that are the value of nameref variables
(declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
so parse errors can be caught before forking a child for command
substitution, as part of word expansion, but after extglob may have
been set by command execution (e.g., in a shell function)
+
+ 8/5
+ ---
+[bump version to bash-5.2-rc3]
+
+ 8/6
+ ---
+trap.c
+ - run_pending_traps: move code from evalstring() so we call
+ parse_and_execute() directly and handle any `return' invocations so
+ we can restore the value of running_trap. Otherwise, if we longjmp
+ past this function, we will think we're running a trap after we
+ finish. Prompted by post from Koichi Murase <myoga.murase@gmail.com>
support to be compiled in or out.
aa. The new `globskipdots' shell option forces pathname expansion never to
- return `.' or `..' unless explicitly matched.
+ return `.' or `..' unless explicitly matched. It is enabled by default.
bb. Array references using `@' and `*' that are the value of nameref variables
(declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
support to be compiled in or out.
aa. The new `globskipdots' shell option forces pathname expansion never to
- return `.' or `..' unless explicitly matched.
+ return `.' or `..' unless explicitly matched. It is enabled by default.
bb. Array references using `@' and `*' that are the value of nameref variables
(declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
#! /bin/sh
-# From configure.ac for Bash 5.2, version 5.043.
+# From configure.ac for Bash 5.2, version 5.044.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for bash 5.2-rc2.
+# Generated by GNU Autoconf 2.71 for bash 5.2-rc3.
#
# Report bugs to <bug-bash@gnu.org>.
#
# Identity of this package.
PACKAGE_NAME='bash'
PACKAGE_TARNAME='bash'
-PACKAGE_VERSION='5.2-rc2'
-PACKAGE_STRING='bash 5.2-rc2'
+PACKAGE_VERSION='5.2-rc3'
+PACKAGE_STRING='bash 5.2-rc3'
PACKAGE_BUGREPORT='bug-bash@gnu.org'
PACKAGE_URL=''
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures bash 5.2-rc2 to adapt to many kinds of systems.
+\`configure' configures bash 5.2-rc3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of bash 5.2-rc2:";;
+ short | recursive ) echo "Configuration of bash 5.2-rc3:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-bash configure 5.2-rc2
+bash configure 5.2-rc3
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by bash $as_me 5.2-rc2, which was
+It was created by bash $as_me 5.2-rc3, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
BASHVERS=5.2
-RELSTATUS=rc2
+RELSTATUS=rc3
case "$RELSTATUS" in
alp*|bet*|dev*|rc*|releng*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by bash $as_me 5.2-rc2, which was
+This file was extended by bash $as_me 5.2-rc3, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-bash config.status 5.2-rc2
+bash config.status 5.2-rc3
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-AC_REVISION([for Bash 5.2, version 5.043])dnl
+AC_REVISION([for Bash 5.2, version 5.044])dnl
define(bashvers, 5.2)
-define(relstatus, rc2)
+define(relstatus, rc3)
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
run_pending_traps ()
{
register int sig;
- int old_exit_value, x;
- int old_running;
+ int x;
+ volatile int old_exit_value, old_running;
WORD_LIST *save_subst_varlist;
HASH_TABLE *save_tempenv;
sh_parser_state_t pstate;
+ volatile int save_return_catch_flag, function_code;
+ procenv_t save_return_catch;
#if defined (ARRAY_VARS)
ARRAY *ps;
#endif
while (pending_traps[sig]--) instead of the if statement. */
if (pending_traps[sig])
{
- if (running_trap == sig+1)
- /*continue*/;
-
+ /* XXX - set last_command_exit_value = trap_saved_exit_value here? */
running_trap = sig + 1;
if (sig == SIGINT)
}
else
{
- /* XXX - should we use save_parser_state/restore_parser_state? */
save_parser_state (&pstate);
save_subst_varlist = subst_assign_varlist;
subst_assign_varlist = 0;
/* XXX - set pending_traps[sig] = 0 here? */
pending_traps[sig] = 0;
evalnest++;
- evalstring (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
+
+ function_code = 0;
+ save_return_catch_flag = return_catch_flag;
+ if (return_catch_flag)
+ {
+ COPY_PROCENV (return_catch, save_return_catch);
+ function_code = setjmp_nosigs (return_catch);
+ }
+
+ if (function_code == 0)
+ x = parse_and_execute (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
+ else
+ {
+ parse_and_execute_cleanup (sig + 1); /* XXX - could use -1 */
+ x = return_catch_value;
+ }
+
evalnest--;
#if defined (JOB_CONTROL)
restore_pipeline (1);
subst_assign_varlist = save_subst_varlist;
restore_parser_state (&pstate);
temporary_env = save_tempenv;
+
+ if (save_return_catch_flag)
+ {
+ return_catch_flag = save_return_catch_flag;
+ return_catch_value = x;
+ COPY_PROCENV (save_return_catch, return_catch);
+ if (function_code)
+ {
+ running_trap = old_running; /* XXX */
+ /* caller will set last_command_exit_value */
+ sh_longjmp (return_catch, 1);
+ }
+ }
}
pending_traps[sig] = 0; /* XXX - move before evalstring? */