Do not set terminate_immediately and interrupt_immediately while expanding tilda

Resolves: #1336800
This commit is contained in:
Siteshwar Vashisht 2016-05-17 18:47:29 +05:30
parent aa44ca55bc
commit f94660b536
2 changed files with 53 additions and 1 deletions

View File

@ -0,0 +1,44 @@
From 262639471df23c1e898b3e74d68db23b02dbbefc Mon Sep 17 00:00:00 2001
From: Siteshwar Vashisht <svashisht@redhat.com>
Date: Tue, 17 May 2016 18:05:03 +0530
Subject: [PATCH] Do not set terminate_immediately and interrupt_immediately
while expanding tilda
---
general.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/general.c b/general.c
index 087689e..220543c 100644
--- a/general.c
+++ b/general.c
@@ -983,16 +983,6 @@ bash_tilde_expand (s, assign_p)
int old_immed, old_term, r;
char *ret;
- old_immed = interrupt_immediately;
- old_term = terminate_immediately;
- /* We want to be able to interrupt tilde expansion. Ordinarily, we can just
- jump to top_level, but we don't want to run any trap commands in a signal
- handler context. We might be able to get away with just checking for
- things like SIGINT and SIGQUIT. */
- if (any_signals_trapped () < 0)
- interrupt_immediately = 1;
- terminate_immediately = 1;
-
tilde_additional_prefixes = assign_p == 0 ? (char **)0
: (assign_p == 2 ? bash_tilde_prefixes2 : bash_tilde_prefixes);
if (assign_p == 2)
@@ -1001,9 +991,6 @@ bash_tilde_expand (s, assign_p)
r = (*s == '~') ? unquoted_tilde_word (s) : 1;
ret = r ? tilde_expand (s) : savestring (s);
- interrupt_immediately = old_immed;
- terminate_immediately = old_term;
-
QUIT;
return (ret);
--
2.5.5

View File

@ -8,7 +8,7 @@
Version: %{baseversion}%{patchleveltag}
Name: bash
Summary: The GNU Bourne Again shell
Release: 4%{?dist}
Release: 5%{?dist}
Group: System Environment/Shells
License: GPLv3+
Url: http://www.gnu.org/software/bash
@ -140,6 +140,9 @@ Patch138: bash-4.3-memleak-lc_all.patch
#1245233 - old memleak reappeared, taken from upstream
Patch139: bash-4.3-old-memleak.patch
#1336800 - Fixes a race condition while expanding tilda
Patch140: bash-tilda-race-condition.patch
BuildRequires: texinfo bison
BuildRequires: ncurses-devel
BuildRequires: autoconf, gettext
@ -241,6 +244,7 @@ This package contains documentation files for %{name}.
%patch137 -p1 -b .readonly
%patch138 -p1 -b .lc_all
%patch139 -p1 -b .oldleak
%patch140 -p1 -b .tilda_expansion
echo %{version} > _distribution
echo %{release} > _patchlevel
@ -442,6 +446,10 @@ end
%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
%changelog
* Tue May 17 2016 Siteshwar Vashisht <svashisht@redhat.com> - 4.3.42-5
- Do not set terminate_immediately and interrupt_immediately while expanding tilda
Resolves: #1336800
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.42-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild