]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-4.2 patch 8
authorChet Ramey <chet.ramey@case.edu>
Wed, 23 Nov 2011 01:00:47 +0000 (20:00 -0500)
committerChet Ramey <chet.ramey@case.edu>
Wed, 23 Nov 2011 01:00:47 +0000 (20:00 -0500)
patchlevel.h
sig.c

index 52efbd769e9fc000eb9e0685a0ec6aacca062f6b..2352c1ca34be62ccee479714691b74e62728fbf7 100644 (file)
@@ -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_ */
diff --git a/sig.c b/sig.c
index 6bd1319b996751eee932dd19db4ba9de51bb4c86..d38246d29f4f7069a97542cc6f8afe48cafe04a1 100644 (file)
--- a/sig.c
+++ b/sig.c
@@ -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);