restore tty settings after timed out read (#572291)

This commit is contained in:
Michal Hlavinka 2011-10-04 09:38:07 +02:00
parent f57567a859
commit 1801570423
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff -up ksh-20110630/src/cmd/ksh93/bltins/read.c.tmoutfix ksh-20110630/src/cmd/ksh93/bltins/read.c
--- ksh-20110630/src/cmd/ksh93/bltins/read.c.tmoutfix 2011-09-22 09:30:20.421888036 +0200
+++ ksh-20110630/src/cmd/ksh93/bltins/read.c 2011-09-22 09:31:14.148350534 +0200
@@ -726,7 +726,7 @@ done:
if(!was_share)
sfset(iop,SF_SHARE,0);
nv_close(np);
- if((flags>>D_FLAG) && (shp->fdstatus[fd]&IOTTY))
+ if(shp->fdstatus[fd]&IOTTY)
tty_cooked(fd);
if(flags&S_FLAG)
hist_flush(shp->gd->hist_ptr);

View File

@ -6,7 +6,7 @@ URL: http://www.kornshell.com/
Group: System Environment/Shells
License: CPL
Version: 20110630
Release: 3%{?dist}
Release: 4%{?dist}
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz
Source3: kshrc.rhs
@ -26,6 +26,8 @@ Patch3: ksh-20110630-ifsfix.patch
# sent upstream, for ksh <= 2011-08-12
Patch4: ksh-20110630-fixkill.patch
Patch5: ksh-20110630-tmoutfix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Conflicts: pdksh
Requires: coreutils, glibc-common, diffutils
@ -48,6 +50,7 @@ with "sh" (the Bourne Shell).
%patch2 -p1 -b .fixregr
%patch3 -p1 -b .ifsfix
%patch4 -p1 -b .fixkill
%patch5 -p1 -b .tmoutfix
#/dev/fd test does not work because of mock
sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options
@ -128,6 +131,9 @@ fi
rm -rf $RPM_BUILD_ROOT
%changelog
* Tue Oct 04 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-4
- restore tty settings after timed out read (#572291)
* Fri Aug 12 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-3
- do not crash when killing last bg job when there is not any