X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; q=dns; s=default; b=JBvv XG1hAHlP5+NLLLoo3tHyu8kggr/zWP09sHewmPz5DNgw00u8HcyaSvli8SaL3rl0 qlBlRwlwfis9U62i7kGjq28Sl5BirIdCDok4FEPqTZB300HdYUXtSxVx/Z+LVHji EmmflY5kMTWTBbcX6Z6Ke63lNq8XLQsKMIrBaso= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; s=default; bh=Eg1P4QOxFn h0saNm8fn0zudBfcc=; b=wUOt10f3iMi7WYPBx1S7sOjI6bWAgp7MceKe1ytNW3 TnQs+tBrGWJygS5J/qLTrd/fX9j7Cv7Hlym5rGVo4XpZ8q8CsHUk+9y2+kTbaqMc v79pxnr/6irmC1DHOZiBb6OrZotlI0iiD+sH4fgLIuKr04WJqERhlpzOKvIu+oP+ k= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=pressed, H*f:sk:102fbd6, H*i:sk:102fbd6, H*MI:sk:102fbd6 X-HELO: mx1.redhat.com Subject: Re: [ANNOUNCEMENT] Updated: libreadline7-7.0.1-1, libreadline-devel-7.0.1-1, bash-4.4.5-1 To: cygwin AT cygwin DOT com References: <587f00e3 DOT 072c9d0a DOT 867a0 DOT d29e AT mx DOT google DOT com> <58804d14 DOT 26149d0a DOT 21734 DOT 79aa AT mx DOT google DOT com> <102fbd64-1bc2-41ee-63d2-932a81124b75 AT cs DOT umass DOT edu> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Message-ID: <9b15fb8f-7925-a963-0947-51dfe68d4058@redhat.com> Date: Thu, 19 Jan 2017 08:21:38 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <102fbd64-1bc2-41ee-63d2-932a81124b75@cs.umass.edu> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BPjsCRN12PXVJWS0XWlVFT8PhgQv5wkCO" X-IsSubscribed: yes --BPjsCRN12PXVJWS0XWlVFT8PhgQv5wkCO Content-Type: multipart/mixed; boundary="Rx1IIIAASkVgt7a76UtXLS07DUiFrnL5S"; protected-headers="v1" From: Eric Blake To: cygwin AT cygwin DOT com Message-ID: <9b15fb8f-7925-a963-0947-51dfe68d4058 AT redhat DOT com> Subject: Re: [ANNOUNCEMENT] Updated: libreadline7-7.0.1-1, libreadline-devel-7.0.1-1, bash-4.4.5-1 References: <587f00e3 DOT 072c9d0a DOT 867a0 DOT d29e AT mx DOT google DOT com> <58804d14 DOT 26149d0a DOT 21734 DOT 79aa AT mx DOT google DOT com> <102fbd64-1bc2-41ee-63d2-932a81124b75 AT cs DOT umass DOT edu> In-Reply-To: <102fbd64-1bc2-41ee-63d2-932a81124b75 AT cs DOT umass DOT edu> --Rx1IIIAASkVgt7a76UtXLS07DUiFrnL5S Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/19/2017 07:23 AM, Eliot Moss wrote: >> I have root caused this. With the new readline, running ./configure > creates >> config.h, as expected. However new version adds this line: >> >> #define HAVE_PSELECT 1 >> >> If you remove this from config.h, then make, the resultant DLL behaves > as it did >> with previous readline. Not sure what is causing this change, I will > try to dig >> into it more. >=20 > You probably found it, but here's why they added use of pselect: >=20 > "h. Use pselect(2), if available, to wait for input before calling > read(2), so > a SIGWINCH can interrupt it, since it doesn't interrupt read(2)." >=20 > Of course that does not explain why it's not working how we would like ... Here's my guess - cygwin1.dll has an incomplete implementation of pselect on Windows consoles when it comes to capturing ALT-numkeypad sequences. Probably something to do with the fact that it takes multiple keystrokes before a single character is supposed to be recognized, which means you have to make a decision after each key state change event whether a character is complete or not. Under the old code, when pselect was not in use, readline just used read() until a character showed up (but blocked in doing so, and risked SIGWINCH issues); now readline can use pselect() and sees that a key has been pressed, except that there is no input available until several more keys are pressed and a key released. I'm no expert in the windows console handling code in cygwin1.dll, but if you are correct that the use (or absence) of HAVE_PSELECT in modern readline makes a difference, then it sounds like we have two things to do: first, I will rebuild readline with a patch to avoid pselect() (the behavior of readline will be riskier, and may break under SIGWINCH, but at least that is no worse than it was with the old readline), meanwhile, someone with more expertise in the console handling code will need a boiled-down testcase (probably a simple .c program that compares a straight read() with a pselect() loop that decides when to read()) to see if they can fix the handling of ALT-numkeypad entries under the console in cygwin1.dll. Once a fixed cygwin1.dll is available, then I can re-release a version of readline built with HAVE_PSELECT. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Rx1IIIAASkVgt7a76UtXLS07DUiFrnL5S-- --BPjsCRN12PXVJWS0XWlVFT8PhgQv5wkCO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJYgMtyAAoJEKeha0olJ0NqWBgH/0WeOjPNARrPv8MDBtrZh+tk gzBf0mn7+7DAjYp3yAij4qBk0QG8IKWpaoi46mXAwukHVSZhh2LP+c9XvActPK5E /HnyqTjqSIrFycfMHDt7vbw4u23eenYRP16tno/qP0FQCXs46KQWuV0iCkREWOYA i/VwCbo0BPDgkz2hxExtX3jv7xVyhnCHzCvEEdg/Wpnv9DorNWXV/gc6sjy/sFUc rQ8vy5MtBujARu990vmTR8mGLUwnxTW5R+UhieI4ugx5iCccVZ6OR6p4FdUu4BK/ ofyCziecz9v7XBSlRdrX4ws35GjUkrozDJFcGPbT2sKcpWJMDMzA2JLsF0FS4X4= =kxPK -----END PGP SIGNATURE----- --BPjsCRN12PXVJWS0XWlVFT8PhgQv5wkCO--