On Thursday 11 March 2010 18:47:07 ольга крыжановская wrote: > Why is this patch not needed for emacs/gmacs mode?
Well, seems I don't understand your question. Looking in the patch (I'm not an author of that patch, but it fixes the problem) - there is just one condition affected = "||mbwide()" added, it means that what needs to be done is already done when other part(s) of the condition is true and one of them are sh_isoption(SH_GEMACS) and sh_isoption(SH_EMACS), so for emacs/gemacs mode it already executes condition body > 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 _______________________________________________ ast-developers mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-developers
