Why is this patch not needed for emacs/gmacs mode?

Olga

On Thu, Mar 11, 2010 at 3:04 PM, Michal Hlavinka <[email protected]> wrote:
> 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.
>
>
> ---------------------- Forwarded message: ----------------------
> Description of problem:
> When a read command is run in a ksh script and is allowed to time out, ksh
> fails to restore the tty settings. Due to this the terminal stops echoing
> characters anymore until it is reset. This happens only when the locale is set
> to something with utf-8 encoding (en_US.UTF-8 for example)
>
> Version-Release number of selected component (if applicable):
> ksh-20100309-1.fc14.x86_64
>
> How reproducible:
> Always
>
> Steps to Reproduce:
> <see above>
>
> Actual results:
> Script returns after 5 seconds and the terminal no longer echoes key strokes
>
> Expected results:
> Script returns after 5 seconds and the terminal behaves normally
>
> Additional info:
> When running in a UTF-8 locale, ksh employs viraw mode to accept input, due to
> which the tty is made into a raw terminal with echo disabled. It does not
> however, restore the terminal on exit, leading to a tty which does not echo
> keystrokes. Attached patch fixes this.
> ---------------- end of forwarded message -----------------------
>
> Regards,
> Michal Hlavinka
>
> _______________________________________________
> ast-developers mailing list
> [email protected]
> https://mailman.research.att.com/mailman/listinfo/ast-developers
>
>



-- 
      ,   _                                    _   ,
     { \/`o;====-    Olga Kryzhanovska   -====;o`\/ }
.----'-/`-/     [email protected]   \-`\-'----.
 `'-..-| /     Solaris/BSD//C/C++ programmer   \ |-..-'`
      /\/\                                     /\/\
      `--`                                      `--`
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to