+++ This bug was initially created as a clone of Bug #572291 +++ Created an attachment (id=399158) cook tty if operating in a multibyte environment (utf-8) 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: Run the following script and wait for it to return: ############################## #!/bin/ksh TMOUT=5 read ############################## 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.
I can reproduce this. Changing test script to: #!/bin/ksh set -o emacs TMOUT=5 read workarounds this problem (set -o vi can be used also) I've already reported this upstream and we're discussing this issue now
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
This request was erroneously denied for the current release of Red Hat Enterprise Linux. The error has been fixed and this request has been re-proposed for the current release.
Another reproducer: ############################## #!/bin/ksh -i TMOUT=5 read ############################## Supposedly fixed versions in Rawhide (bug 572291) and RHEL6 (bug 577223) are still broken for this.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0159.html