diff options
author | Chet Ramey <chet.ramey@case.edu> | 2011-11-22 20:00:47 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2011-11-22 20:00:47 -0500 |
commit | d5d0096115d0d484fd669ad170498962ea45e841 (patch) | |
tree | 09641a3465004f0838978a1f93d1acb3c3e1df7f | |
parent | 1cc068989c89ffa51f6cd7219c826c0bb345f0f8 (diff) | |
download | bash-d5d0096115d0d484fd669ad170498962ea45e841.tar.gz |
Bash-4.2 patch 8
-rw-r--r-- | patchlevel.h | 2 | ||||
-rw-r--r-- | sig.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/patchlevel.h b/patchlevel.h index 52efbd76..2352c1ca 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -25,6 +25,6 @@ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh looks for to find the patch level (for the sccs version string). */ -#define PATCHLEVEL 7 +#define PATCHLEVEL 8 #endif /* _PATCHLEVEL_H_ */ @@ -46,6 +46,7 @@ #if defined (READLINE) # include "bashline.h" +# include <readline/readline.h> #endif #if defined (HISTORY) @@ -62,6 +63,7 @@ extern int parse_and_execute_level, shell_initialized; #if defined (HISTORY) extern int history_lines_this_session; #endif +extern int no_line_editing; extern void initialize_siglist (); @@ -505,7 +507,10 @@ termsig_sighandler (sig) { #if defined (HISTORY) /* XXX - will inhibit history file being written */ - history_lines_this_session = 0; +# if defined (READLINE) + if (interactive_shell == 0 || interactive == 0 || (sig != SIGHUP && sig != SIGTERM) || no_line_editing || (RL_ISSTATE (RL_STATE_READCMD) == 0)) +# endif + history_lines_this_session = 0; #endif terminate_immediately = 0; termsig_handler (sig); |