commit bash-20180202 snapshot

This commit is contained in:
Chet Ramey
2018-02-05 10:34:47 -05:00
parent 661f4c20c3
commit 0275a139ab
14 changed files with 69 additions and 30 deletions
+25
View File
@@ -14902,3 +14902,28 @@ execute_cmd.c
- execute_command_internal: if redirections attached to a compound
command fail, make sure we discard the `internal_fifos' unwind-
protect frame after freeing the copied fifo_list and before returning
1/30
----
lib/readline/rlprivate.h
- BRACK_PASTE_FINI: add \r to the end of the string to avoid problems
with the tty driver thinking the cursor was in the wrong position.
Fixes issue reported by Egmont Koblinger <egmont@gmail.com>
1/31
----
lib/sh/zread.c
- zread,zreadintr: call check_signals() before calling read() to
minimize the race window between signal delivery, signal handling,
and a blocking read(2). Partial fix for FIFO read issue reported by
Oyvind Hvidsten <oyvind.hvidsten@dhampir.no>
doc/{bash.1,bashref.texi}
- shopt: document `assoc_expand_once' shell option
2/1
---
config-top.h
- DONT_REPORT_SIGPIPE: define, so non-interactive shells will no
longer print termination messages for child processes killed by
SIGTERM
+2 -2
View File
@@ -1047,7 +1047,7 @@ hashlib.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
hashlib.o: make_cmd.h subst.h sig.h pathnames.h externs.h
input.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
input.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h input.h error.h externs.h
input.o: quit.h shell.h
input.o: quit.h shell.h pathnames.h
list.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
list.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
list.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
@@ -1070,7 +1070,7 @@ make_cmd.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h error.h flags.h m
make_cmd.o: variables.h arrayfunc.h conftypes.h array.h hashlib.h subst.h input.h externs.h
make_cmd.o: jobs.h quit.h sig.h siglist.h syntax.h dispose_cmd.h parser.h
make_cmd.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h ${BASHINCDIR}/ocache.h
make_cmd.o: shell.h execute_cmd.h
make_cmd.o: shell.h execute_cmd.h pathnames.h
y.tab.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/memalloc.h
y.tab.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
y.tab.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+2 -2
View File
@@ -44,8 +44,8 @@
once, when performing variable expansion. */
int assoc_expand_once = 0;
/* Ditto for indexed array subscripts */
int array_expand_once = 1;
/* Ditto for indexed array subscripts -- currently unused */
int array_expand_once = 0;
static SHELL_VAR *bind_array_var_internal __P((SHELL_VAR *, arrayind_t, char *, char *, int));
static SHELL_VAR *assign_array_element_internal __P((SHELL_VAR *, char *, char *, char *, int, char *, int));
+1
View File
@@ -585,6 +585,7 @@ read_builtin (list)
}
reading = 1;
CHECK_ALRM;
if (unbuffered_read == 2)
retval = posixly_correct ? zreadintr (fd, &c, 1) : zreadn (fd, &c, nchars - nr);
else if (unbuffered_read)
+1 -1
View File
@@ -53,7 +53,7 @@
/* Define DONT_REPORT_SIGTERM if you don't want to see `Terminates' message
when a job exits due to SIGTERM, since that's the default signal sent
by the kill builtin. */
/* #define DONT_REPORT_SIGTERM */
#define DONT_REPORT_SIGTERM
/* Define DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS if you don't want builtins
like `echo' and `printf' to report errors when output does not succeed
Vendored
+12 -12
View File
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac for Bash 4.4, version 4.089.
# From configure.ac for Bash 5.0, version 4.090.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for bash 4.4-maint.
# Generated by GNU Autoconf 2.69 for bash 5.0-alpha.
#
# Report bugs to <bug-bash@gnu.org>.
#
@@ -581,8 +581,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='bash'
PACKAGE_TARNAME='bash'
PACKAGE_VERSION='4.4-maint'
PACKAGE_STRING='bash 4.4-maint'
PACKAGE_VERSION='5.0-alpha'
PACKAGE_STRING='bash 5.0-alpha'
PACKAGE_BUGREPORT='bug-bash@gnu.org'
PACKAGE_URL=''
@@ -1394,7 +1394,7 @@ if test "$ac_init_help" = "long"; then
# 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 4.4-maint to adapt to many kinds of systems.
\`configure' configures bash 5.0-alpha to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1459,7 +1459,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of bash 4.4-maint:";;
short | recursive ) echo "Configuration of bash 5.0-alpha:";;
esac
cat <<\_ACEOF
@@ -1655,7 +1655,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
bash configure 4.4-maint
bash configure 5.0-alpha
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2364,7 +2364,7 @@ cat >config.log <<_ACEOF
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 4.4-maint, which was
It was created by bash $as_me 5.0-alpha, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2758,8 +2758,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
ac_config_headers="$ac_config_headers config.h"
BASHVERS=4.4
RELSTATUS=maint
BASHVERS=5.0
RELSTATUS=alpha
case "$RELSTATUS" in
alp*|bet*|dev*|rc*|releng*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
@@ -16814,7 +16814,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# 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 4.4-maint, which was
This file was extended by bash $as_me 5.0-alpha, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16880,7 +16880,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
bash config.status 4.4-maint
bash config.status 5.0-alpha
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
+3 -3
View File
@@ -21,10 +21,10 @@ dnl Process this file with autoconf to produce a configure script.
# 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 4.4, version 4.089])dnl
AC_REVISION([for Bash 5.0, version 4.090])dnl
define(bashvers, 4.4)
define(relstatus, maint)
define(bashvers, 5.0)
define(relstatus, alpha)
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
+7 -2
View File
@@ -5,12 +5,12 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
.\" Last Change: Thu Jan 25 10:51:45 EST 2018
.\" Last Change: Wed Jan 31 11:23:23 EST 2018
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2018 January 25" "GNU Bash 4.4"
.TH BASH 1 "2018 January 31" "GNU Bash 4.4"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -9691,6 +9691,11 @@ The list of \fBshopt\fP options is:
.if n .sp 1v
.PD 0
.TP 8
.B assoc_expand_once
If set, the shell suppresses multiple evaluation of associative array
subscripts during arithmetic expression evaluation and while executing
builtins that can perform variable assignments.
.TP 8
.B autocd
If set, a command name that is the name of a directory is executed as if
it were the argument to the \fBcd\fP command.
+6 -1
View File
@@ -3605,7 +3605,7 @@ The @option{-d} option causes the shell to forget the remembered location
of each @var{name}.
If the @option{-t} option is supplied, the full pathname to which each
@var{name} corresponds is printed. If multiple @var{name} arguments are
supplied with @option{-t} the @var{name} is printed before the hashed
supplied with @option{-t}, the @var{name} is printed before the hashed
full pathname.
The @option{-l} option causes output to be displayed in a format
that may be reused as input.
@@ -5097,6 +5097,11 @@ option.
The list of @code{shopt} options is:
@table @code
@item assoc_expand_once
If set, the shell suppresses multiple evaluation of associative array
subscripts during arithmetic expression evaluation and while executing
builtins that can perform variable assignments.
@item autocd
If set, a command name that is the name of a directory is executed as if
it were the argument to the @code{cd} command.
+2 -2
View File
@@ -2,10 +2,10 @@
Copyright (C) 1988-2018 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Thu Jan 25 10:51:29 EST 2018
@set LASTCHANGE Wed Jan 31 11:23:04 EST 2018
@set EDITION 4.4
@set VERSION 4.4
@set UPDATED 25 January 2018
@set UPDATED 31 January 2018
@set UPDATED-MONTH January 2018
+3 -2
View File
@@ -1168,15 +1168,16 @@ rl_redisplay (void)
wrap_offset. */
if (linenum == 0 && (mb_cur_max > 1 && rl_byte_oriented == 0) && OLD_CPOS_IN_PROMPT())
_rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */
else if (linenum == prompt_last_screen_line &&
else if (cpos_adjusted == 0 &&
linenum == prompt_last_screen_line &&
prompt_physical_chars > _rl_screenwidth &&
(mb_cur_max > 1 && rl_byte_oriented == 0) &&
cpos_adjusted == 0 &&
_rl_last_c_pos != o_cpos &&
_rl_last_c_pos > (prompt_last_invisible - _rl_screenwidth - prompt_invis_chars_first_line)) /* XXX - rethink this last one */
/* This assumes that all the invisible characters are split
between the first and last lines of the prompt, if the
prompt consumes more than two lines. It's usually right */
/* XXX - not sure this is ever executed */
_rl_last_c_pos -= (wrap_offset-prompt_invis_chars_first_line);
/* If this is the line with the prompt, we might need to
+2 -2
View File
@@ -124,7 +124,7 @@ The @code{lithist}
shell option causes the shell to save the command with embedded newlines
instead of semicolons.
The @code{shopt} builtin is used to set these options.
@xref{Bash Builtins}, for a description of @code{shopt}.
@xref{The Shopt Builtin}, for a description of @code{shopt}.
@node Bash History Builtins
@section Bash History Builtins
@@ -286,7 +286,7 @@ in a double-quoted string.
@ifset BashFeatures
Several shell options settable with the @code{shopt}
builtin (@pxref{Bash Builtins}) may be used to tailor
builtin (@pxref{The Shopt Builtin}) may be used to tailor
the behavior of history expansion. If the
@code{histverify} shell option is enabled, and Readline
is being used, history substitutions are not immediately passed to
+1 -1
View File
@@ -307,7 +307,7 @@ extern int _rl_search_getchar PARAMS((_rl_search_cxt *));
#define BRACK_PASTE_SLEN 6
#define BRACK_PASTE_INIT "\033[?2004h"
#define BRACK_PASTE_FINI "\033[?2004l"
#define BRACK_PASTE_FINI "\033[?2004l\r"
/* macro.c */
extern void _rl_with_macro_input PARAMS((char *));
+2
View File
@@ -53,6 +53,7 @@ zread (fd, buf, len)
{
ssize_t r;
check_signals (); /* check for signals before a blocking read */
while ((r = read (fd, buf, len)) < 0 && errno == EINTR)
/* XXX - bash-5.0 */
/* We check executing_builtin and run traps here for backwards compatibility */
@@ -103,6 +104,7 @@ zreadintr (fd, buf, len)
char *buf;
size_t len;
{
check_signals ();
return (read (fd, buf, len));
}