Explicitly unset nonblocking mode while reading from stdin

Resolves: #1068697
This commit is contained in:
Siteshwar Vashisht 2017-04-26 14:31:30 +02:00
parent fbc2878c17
commit 31a9b53e19
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,11 @@
diff --git a/parse.y b/parse.y
index 85f1c4f..9d1cdf8 100644
--- a/parse.y
+++ b/parse.y
@@ -1453,6 +1453,7 @@ yy_readline_get ()
old_sigint = (SigHandler *)set_signal_handler (SIGINT, sigint_sighandler);
}
+ sh_unset_nodelay_mode (fileno (rl_instream)); /* just in case */
current_readline_line = readline (current_readline_prompt ?
current_readline_prompt : "");

View File

@ -8,7 +8,7 @@
Version: %{baseversion}%{patchleveltag}
Name: bash
Summary: The GNU Bourne Again shell
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv3+
Url: http://www.gnu.org/software/bash
Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{baseversion}.tar.gz
@ -82,6 +82,10 @@ Patch127: bash-4.4-no-loadable-builtins.patch
# This should be dropped while rebasing to bash-4.5
Patch128: bash-4.4-heredoc-cloexec.patch
# 1068697 - Explicitly unset nonblocking mode while reading from stdin
# This should be dropped while rebasing to bash-4.5
Patch129: bash-4.4-unset-nonblock-stdin.patch
BuildRequires: texinfo bison
BuildRequires: ncurses-devel
BuildRequires: autoconf, gettext
@ -298,6 +302,10 @@ end
%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
%changelog
* Wed Apr 26 2017 Siteshwar Vashisht <svashisht@redhat.com> - 4.4.12-4
- Explicitly unset nonblocking mode while reading from stdin
Resolves: #1068697
* Wed Apr 26 2017 Siteshwar Vashisht <svashisht@redhat.com> - 4.4.12-3
- Fix heredoc file descriptor leak
Resolves: #1413676