rpms/ksh/F-12 ksh-20100309-restoretty.patch, NONE, 1.1 ksh.spec, 1.58, 1.59

Michal Hlavinka mhlavink at fedoraproject.org
Fri Mar 26 13:56:04 UTC 2010


Author: mhlavink

Update of /cvs/pkgs/rpms/ksh/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv25824

Modified Files:
	ksh.spec 
Added Files:
	ksh-20100309-restoretty.patch 
Log Message:
* Fri Mar 26 2010 Michal Hlavinka <mhlavink at redhat.com> - 20100309-2
- restore tty settings after timed out read for utf-8 locale


ksh-20100309-restoretty.patch:
 fault.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE ksh-20100309-restoretty.patch ---
The ed_viread method is used for reading when locale has an encoding that uses
wide characters (utf8 for example). So we need to cook the raw'ed terminal
before exit, otherwise we end up with a terminal that cannot echo.

--- a/src/cmd/ksh93/sh/fault.c	2010-01-18 21:41:18.000000000 +0530
+++ b/src/cmd/ksh93/sh/fault.c	2010-03-10 21:23:56.000000000 +0530
@@ -614,7 +614,7 @@ void sh_done(void *ptr, register int sig
 	sh_accend();
 #endif	/* SHOPT_ACCT */
 #if SHOPT_VSH || SHOPT_ESH
-	if(sh_isoption(SH_EMACS)||sh_isoption(SH_VI)||sh_isoption(SH_GMACS))
+	if(sh_isoption(mbwide()||SH_EMACS)||sh_isoption(SH_VI)||sh_isoption(SH_GMACS))
 		tty_cooked(-1);
 #endif
 #ifdef JOBS


Index: ksh.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ksh/F-12/ksh.spec,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -p -r1.58 -r1.59
--- ksh.spec	10 Mar 2010 15:58:04 -0000	1.58
+++ ksh.spec	26 Mar 2010 13:56:04 -0000	1.59
@@ -6,7 +6,7 @@ URL:          http://www.kornshell.com/
 Group:        System Environment/Shells
 License:      CPL
 Version:      20100309
-Release:      1%{?dist}
+Release:      2%{?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
@@ -18,6 +18,9 @@ Patch1:       ksh-20070328-builtins.patc
 #435159 - check if there is looped list
 Patch2:       ksh-20090630-jlist.patch
 
+#sent upstream, 572291 - tty settings not restored after timed out read for utf-8 locale
+Patch3:       ksh-20100309-restoretty.patch
+
 BuildRoot:    %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Conflicts:    pdksh
 Requires: coreutils, glibc-common, diffutils
@@ -36,6 +39,7 @@ with "sh" (the Bourne Shell).
 %setup -q -T -D -a 1
 %patch1 -p1 -b .builtins
 %patch2 -p1 -b .jlist
+%patch3 -p1 -b .restoretty
 
 #/dev/fd test does not work because of mock
 sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options
@@ -91,6 +95,9 @@ fi
     rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* Fri Mar 26 2010 Michal Hlavinka <mhlavink at redhat.com> - 20100309-2
+- restore tty settings after timed out read for utf-8 locale
+
 * Wed Mar 10 2010 Michal Hlavinka <mhlavink at redhat.com> - 20100309-1
 - updated to 2010-03-09
 - fix mock building - detection of /dev/fd/X



More information about the scm-commits mailing list