rpms/bash/devel bash-sighandler.patch,NONE,1.1 bash.spec,1.82,1.83
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Sep 21 14:36:30 UTC 2005
Author: twaugh
Update of /cvs/dist/rpms/bash/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv17785
Modified Files:
bash.spec
Added Files:
bash-sighandler.patch
Log Message:
* Wed Sep 21 2005 Tim Waugh <twaugh at redhat.com>
- Avoid writing history files during signal handling (bug #163235).
bash-sighandler.patch:
bashhist.c | 3 ++-
sig.c | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
--- NEW FILE bash-sighandler.patch ---
--- bash-2.05b/sig.c.sighandler 2002-07-10 21:07:53.000000000 +0100
+++ bash-2.05b/sig.c 2005-09-21 14:36:51.000000000 +0100
@@ -399,10 +399,13 @@
longjmp (top_level, value);
}
+int global_sig = 0;
sighandler
termination_unwind_protect (sig)
int sig;
{
+ global_sig = sig;
+
if (sig == SIGINT && signal_is_trapped (SIGINT))
run_interrupt_trap ();
@@ -425,6 +428,7 @@
set_signal_handler (sig, SIG_DFL);
kill (getpid (), sig);
+ global_sig = 0;
SIGRETURN (0);
}
--- bash-2.05b/bashhist.c.sighandler 2002-03-12 15:29:56.000000000 +0000
+++ bash-2.05b/bashhist.c 2005-09-21 14:47:00.000000000 +0100
@@ -324,12 +324,13 @@
int
maybe_save_shell_history ()
{
+ extern int global_sig;
int result;
char *hf;
struct stat buf;
result = 0;
- if (history_lines_this_session)
+ if (history_lines_this_session && global_sig == 0)
{
hf = get_string_value ("HISTFILE");
Index: bash.spec
===================================================================
RCS file: /cvs/dist/rpms/bash/devel/bash.spec,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- bash.spec 8 Aug 2005 14:43:42 -0000 1.82
+++ bash.spec 21 Sep 2005 14:36:27 -0000 1.83
@@ -54,6 +54,7 @@
Patch124: bash-pwd.patch
Patch125: bash-afs.patch
Patch126: bash-setlocale.patch
+Patch127: bash-sighandler.patch
Prefix: %{_prefix}
Requires: mktemp
Obsoletes: bash2 etcskel
@@ -122,6 +123,7 @@
%patch124 -p1 -b .pwd
%patch125 -p1 -b .afs
%patch126 -p1 -b .setlocale
+%patch127 -p1 -b .sighandler
echo %{version} > _distribution
echo %{release} > _patchlevel
@@ -255,6 +257,9 @@
%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
%changelog
+* Wed Sep 21 2005 Tim Waugh <twaugh at redhat.com>
+- Avoid writing history files during signal handling (bug #163235).
+
* Mon Aug 8 2005 Tim Waugh <twaugh at redhat.com> 3.0-33
- Fixed multibyte IFS handling for invalid input (bug #165243).
More information about the fedora-cvs-commits
mailing list