From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124440 invoked by alias); 19 Jan 2017 18:13:51 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 124427 invoked by uid 89); 19 Jan 2017 18:13:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-101.6 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=commitdiff, H*MI:sk:9b15fb8, H*f:sk:9b15fb8, H*i:sk:9b15fb8 X-HELO: drew.franken.de Received: from mail-n.franken.de (HELO drew.franken.de) (193.175.24.27) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Jan 2017 18:13:40 +0000 Received: from aqua.hirmke.de (aquarius.franken.de [193.175.24.89]) (Authenticated sender: aquarius) by mail-n.franken.de (Postfix) with ESMTPSA id 9BACA721E2822 for ; Thu, 19 Jan 2017 19:13:36 +0100 (CET) Received: from calimero.vinschen.de (calimero.vinschen.de [192.168.129.6]) by aqua.hirmke.de (Postfix) with ESMTP id 08D105E0212 for ; Thu, 19 Jan 2017 19:13:36 +0100 (CET) Received: by calimero.vinschen.de (Postfix, from userid 500) id E36CAA805FC; Thu, 19 Jan 2017 19:13:35 +0100 (CET) Date: Thu, 19 Jan 2017 18:13:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: [ANNOUNCEMENT] Updated: libreadline7-7.0.1-1, libreadline-devel-7.0.1-1, bash-4.4.5-1 Message-ID: <20170119181335.GA25162@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <587f00e3.072c9d0a.867a0.d29e@mx.google.com> <58804d14.26149d0a.21734.79aa@mx.google.com> <102fbd64-1bc2-41ee-63d2-932a81124b75@cs.umass.edu> <9b15fb8f-7925-a963-0947-51dfe68d4058@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FCuugMFkClbJLl1L" Content-Disposition: inline In-Reply-To: <9b15fb8f-7925-a963-0947-51dfe68d4058@redhat.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-SW-Source: 2017-01/txt/msg00257.txt.bz2 --FCuugMFkClbJLl1L Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2840 On Jan 19 08:21, Eric Blake wrote: > 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 = ... >=20 > 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. >=20 > 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. I applied a patch to Cygwin to handle these Alt-Numpad sequences, see https://sourceware.org/git/?p=3Dnewlib-cygwin.git;a=3Dcommitdiff;h=3D4652cc4 I uploaded new developer snapshots to https://cygwin.com/snapshots/ for testing. Please give them a try and report back. Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --FCuugMFkClbJLl1L Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYgQHPAAoJEPU2Bp2uRE+gDmsP/0lb3afrFa4uM6uPnYSLCEny Y4pEhoIYbKUUa9jnyYILfuvc0QgNMaHSBdd5qlod6V7pFZdi/wEmZaczr4LDH6zt KNJPzLhNWGHMxuncu/v9TLKtJH2fERvpWErFVfnq5VsxPAwPhKdX+bJL5lflWwRL rOVMHuPkmRsr/aScA1DRxgmVfd3ChMeWAqbExe5+F3L6qdSDh73jc6I1BnYYpxRG cRC8ksrWaTFK/SPaxKqQbc0AnrcnHAMTCb9ztpzBShjGyfKDNJyu/9KdOeC3bs/D cuFKDdrM6VNTZ5FmliOU0bIYK1FfyK++YHosNxlFmkqc6uIOdiAb+I+i7LDXLD4y 6oUSL08Tn/mOa8siBjd8S3WVMeDtJoAKSfvb8DPN2eNPuKtqevn2GlCEeHH97OJ8 CcVGDK+TpL0R+NPcWnV+UJEynE4iuSR1VFRy3O3NyQ+F71ddpRIr/hm7YLONjZl4 Hgaliy2XA9JJOWAqYFMWOHSU/5nx3FGT6r/wZkwxMxMpCmOoIlZIsokG2rpSVztO OY1Gr1sGxM4QrkhieW0sZW5TYBnHKmFbRQvvCrKEUqfPfkvvVTdA+1yrMTuhD+4u qGNk++e8A0hRLYIxLsYLJJCvGU0kWHSHL/+kTvXHBw3oBG52Ph1Tn258SQrLjesl K5uEbsd+1X+yi22Z5FEv =mwEU -----END PGP SIGNATURE----- --FCuugMFkClbJLl1L--