Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: Jim Meyering To: Eric Blake Cc: bug-coreutils AT gnu DOT org, cygwin AT cygwin DOT com Subject: Re: [Fwd: Strange-Dangerous behaviour in Cygwin] In-Reply-To: <427CEB21.2010302@byu.net> (Eric Blake's message of "Sat, 07 May 2005 10:21:53 -0600") References: <427CEB21 DOT 2010302 AT byu DOT net> Date: Sat, 07 May 2005 19:24:29 +0200 Message-ID: <85ll6r3q5u.fsf@pi.meyering.net> Lines: 21 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Eric Blake wrote: > Relevant clips from this cygwin bug report. When tty settings are weird > (I'm not sure whether the bug is in cygwin, xterm, or just bad tty > settings that could be reproduced elsewhere), backspace only repositions > the cursor on screen, so that the actual buffer read by yesno() can > contain "y\bn" instead of "n". Is it possible for lib/yesno.c to be a > little more paranoid and check that there are not embedded characters > normally used in terminal editing that would undo the first character? I don't think changing yesno would be appropriate in this case. What if the string is "n\by"? What if \b is not the erase character? What if the string is "yes" and `e' is the `erase' character? Should it handle both DEL and ERASE characters? Should it also handle word-erase and line-erase characters? I know you said `normally used...', so I assume you wanted something simple, befitting yesno's status, but I don't see an appropriate way to solve the problem by changing yesno. Alternative opinions (or patches to yesno.c) welcome. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/