From 3ede1caab67b39613841f2e7a9104a9144871fc6 Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Sat, 3 Dec 2011 12:59:20 -0500 Subject: [PATCH] commit bash-20040707 snapshot --- CHANGES | 22 ++++++++++++++++++++++ CWRU/CWRU.chlog | 8 ++++++++ configure.in | 4 ++-- lib/readline/misc.c | 8 ++++++++ tests/run-jobs | 2 ++ 5 files changed, 42 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 32d62fdf4..d4787673b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,25 @@ +This document details the changes between this version, bash-3.0-release, +and the previous version, bash-3.0-rc1. + +1. Changes to Bash + +a. Fixed a boundary overrun that could cause segmentation faults when the + completion code hands an incomplete construct to the word expansion + functions. + +b. Changed posix mode behavior so that an error in a variable assignment + preceding a special builtin causes a non-interactive shell to exit. + +c. Change the directory expansion portion of the completion code to not + expand embedded command substitutions if the directory name appears in + the file system. + +2. Changes to Readline + +a. Fixed a problem with readline saving the contents of the current line + before beginning a non-interactive search. + +------------------------------------------------------------------------------ This document details the changes between this version, bash-3.0-rc1, and the previous version, bash-3.0-beta1. diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index b408bc4de..83f5780bd 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -9604,3 +9604,11 @@ bashline.c if the filename appears to have been completed from the file system rather than typed in by the user. Bug reported by Tim Waugh + + 7/7 + --- +lib/readline/misc.c + - if _rl_maybe_save_line is being asked to save a line other than + what's already saved, free up the current saved line and save the + current contents of rl_line_buffer. Bug reported by + llattanzi@apple.com diff --git a/configure.in b/configure.in index f58757b8a..01e070d4d 100644 --- a/configure.in +++ b/configure.in @@ -22,10 +22,10 @@ dnl Process this file with autoconf to produce a configure script. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. -AC_REVISION([for Bash 3.0, version 3.164, from autoconf version] AC_ACVERSION)dnl +AC_REVISION([for Bash 3.0, version 3.165, from autoconf version] AC_ACVERSION)dnl define(bashvers, 3.0) -define(relstatus, rc1) +define(relstatus, release) AC_INIT(bash, bashvers-relstatus, bug-bash@gnu.org) diff --git a/lib/readline/misc.c b/lib/readline/misc.c index f55412356..ab1e1337f 100644 --- a/lib/readline/misc.c +++ b/lib/readline/misc.c @@ -276,6 +276,13 @@ rl_maybe_save_line () _rl_saved_line_for_history->line = savestring (rl_line_buffer); _rl_saved_line_for_history->data = (char *)rl_undo_list; } + else if (STREQ (rl_line_buffer, _rl_saved_line_for_history->line) == 0) + { + free (_rl_saved_line_for_history->line); + _rl_saved_line_for_history->line = savestring (rl_line_buffer); + _rl_saved_line_for_history->data = (char *)rl_undo_list; /* XXX possible memleak */ + } + return 0; } @@ -439,6 +446,7 @@ rl_get_previous_history (count, key) rl_replace_from_history (temp, 0); _rl_history_set_point (); } + return 0; } diff --git a/tests/run-jobs b/tests/run-jobs index e53ecd580..ddd7d5579 100644 --- a/tests/run-jobs +++ b/tests/run-jobs @@ -1,5 +1,7 @@ echo "warning: some of these tests may fail if job control has not been compiled" >&2 echo "warning: into the shell" >&2 +echo "warning: there may be a message regarding a cat process dying due to a" >&2 +echo "warning: SIGUP. Please disregard." >&2 ${THIS_SH} ./jobs.tests > /tmp/xx 2>&1 diff /tmp/xx jobs.right && rm -f /tmp/xx -- 2.47.3