Subject:
--------
> Hi,
>
> one our user has reported an issue with wrong tty state after timed out read,
> when using utf-8 locale. The reproducer is:
>
> cat >test.sh <<EOF
> #!/bin/ksh
> TMOUT=5
> read
> EOF
>
> chmod +x test.sh
> ./test.sh
>
> Actual result (after letting read to time out) is tty does not echo any input
> until terminal is reset. Reporter provided a patch (attached) to fix this.
>
A work around is to out
set -o vi
or
set -g emacs
before the read.
I have enclosed the change that I made to fixe this problem below.
=====================cut here=====================
*** old/sh/fault.c Mon Jan 18 11:11:18 2010
--- new/sh/fault.c Fri Mar 12 16:18:41 2010
***************
*** 595,601 ****
sh_accend();
#endif /* SHOPT_ACCT */
#if SHOPT_VSH || SHOPT_ESH
! if(sh_isoption(SH_EMACS)||sh_isoption(SH_VI)||sh_isoption(SH_GMACS))
tty_cooked(-1);
#endif
#ifdef JOBS
--- 595,601 ----
sh_accend();
#endif /* SHOPT_ACCT */
#if SHOPT_VSH || SHOPT_ESH
!
if(mbwide()||sh_isoption(SH_EMACS)||sh_isoption(SH_VI)||sh_isoption(SH_GMACS))
tty_cooked(-1);
#endif
#ifdef JOBS
=====================cut here=====================
David Korn
[email protected]
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers