From c5cc27c847e1ac8c27e7acc44a6aeb413a4127e4 Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Wed, 30 Mar 2016 10:54:11 -0400 Subject: [PATCH] commit bash-20160304 snapshot --- CWRU/CWRU.chlog | 10 +++++++++- doc/FAQ | 12 +++++++++--- examples/loadables/Makefile.in | 2 +- examples/loadables/mypid.c | 1 + include/shmbchar.h | 6 +++--- tests/source6.sub | 5 +++++ variables.c | 2 +- 7 files changed, 29 insertions(+), 9 deletions(-) diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index a8c09b1d..a92a5542 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -10190,7 +10190,7 @@ shell.c ----- variables.c - initialize_shell_variables: don't inherit PS4 from the environment - if the shell is running with euid == 0; just reset it to `+'. This + if the shell is running with euid == 0; just reset it to `+ '. This is a known potential vulnerability, since PS4 expansion performs command substitution in the root shell's context before displaying it. Discussion started by up201407890@alunos.dcc.fc.up.pt @@ -10544,3 +10544,11 @@ doc/bash.1,lib/readline/doc/{readline.3,rluser.texi} - output-meta: modify the description to note that readline will turn the default to on if the locale contains eight-bit characters. From a message from Branden Robinson + + 3/6 + --- +examples/loadables/Makefile.in + - install-dev: make installdirs a prerequisite; don't rely on the + install-supported target to create it first. Bug with parallel + install (`make -j 4 install') reported by Chris Staub + diff --git a/doc/FAQ b/doc/FAQ index eae94402..b0402600 100644 --- a/doc/FAQ +++ b/doc/FAQ @@ -1,4 +1,4 @@ -This is the Bash FAQ, version 4.13, for Bash version 4.3. +This is the Bash FAQ, version 4.14, for Bash version 4.4. This document contains a set of frequently-asked questions concerning Bash, the GNU Bourne-Again Shell. Bash is a freely-available command @@ -2169,11 +2169,17 @@ You may also need Finally, you need to tell readline that you will be inputting and displaying eight-bit characters. You use readline variables to do -this. These variables can be set in your .inputrc or using the bash +this. convert-meta says what to do if you read a character with its +eighth bit set. input-meta says whether to permit characters with the +eighth bit at all. output-meta determines how to display characters +with the eighth bit set: if on, they are output directly; if it is off, +such characters are displayed as a meta-prefixed escape sequence. + +These variables can be set in your .inputrc or using the bash `bind' builtin. Here's an example using `bind': bash$ bind 'set convert-meta off' - bash$ bind 'set meta-flag on' + bash$ bind 'set input-meta on' bash$ bind 'set output-meta on' The `set' commands between the single quotes may also be placed diff --git a/examples/loadables/Makefile.in b/examples/loadables/Makefile.in index 1fad9db2..ec305cda 100644 --- a/examples/loadables/Makefile.in +++ b/examples/loadables/Makefile.in @@ -234,7 +234,7 @@ distclean maintainer-clean: clean installdirs: @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(loadablesdir) -install-dev: +install-dev: installdirs @$(INSTALL_DATA) Makefile.inc $(DESTDIR)$(loadablesdir)/Makefile.inc @( cd $(BUILD_DIR) && ${MAKE} ${MFLAGS} DESTDIR="$(DESTDIR)" install-headers) diff --git a/examples/loadables/mypid.c b/examples/loadables/mypid.c index 1f185486..8f2341f9 100644 --- a/examples/loadables/mypid.c +++ b/examples/loadables/mypid.c @@ -11,6 +11,7 @@ * references to it do not attempt to access memory that is no longer part * of this process's address space. */ +#include #include #include diff --git a/include/shmbchar.h b/include/shmbchar.h index 2da1a01e..a4f3f247 100644 --- a/include/shmbchar.h +++ b/include/shmbchar.h @@ -34,9 +34,8 @@ /* is_basic(c) tests whether the single-byte character c is in the - ISO C "basic character set". - This is a convenience function, and is in this file only to share code - between mbiter_multi.h and mbfile_multi.h. */ + ISO C "basic character set". */ + #if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ @@ -79,6 +78,7 @@ is_basic (char c) { switch (c) { + case '\b': case '\r': case '\n': case '\t': case '\v': case '\f': case ' ': case '!': case '"': case '#': case '%': case '&': case '\'': case '(': case ')': case '*': diff --git a/tests/source6.sub b/tests/source6.sub index 9e1cb649..43db2031 100644 --- a/tests/source6.sub +++ b/tests/source6.sub @@ -19,8 +19,13 @@ echo $? echo $? # pipe +if [ -e /dev/stdin ]; then echo "echo three - OK" | . /dev/stdin echo $? +else +# no /dev/stdin, just fake it +echo "three - OK" ; echo 0 +fi # FIFO mkfifo $TMPDIR/fifo-$$ diff --git a/variables.c b/variables.c index 9db87671..2b131301 100644 --- a/variables.c +++ b/variables.c @@ -505,7 +505,7 @@ initialize_shell_variables (env, privmode) } if (current_user.euid == 0) - bind_variable ("PS4", "+", 0); + bind_variable ("PS4", "+ ", 0); else set_if_not ("PS4", "+ ");