From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13485 invoked by alias); 25 Aug 2015 09:52:37 -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 13405 invoked by uid 89); 25 Aug 2015 09:52:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.4 required=5.0 tests=AWL,BAYES_40,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: mx1.ogt.co.uk Received: from mx1.ogt.co.uk (HELO mx1.ogt.co.uk) (213.1.212.91) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 25 Aug 2015 09:52:35 +0000 Received: from [192.168.0.3] (port=56394 helo=mail.ogt.co.uk) by mx1.ogt.co.uk with esmtps (TLSv1:AES128-SHA:128) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1ZUAu5-0001sp-1L; Tue, 25 Aug 2015 10:52:29 +0100 Received: from ExchangeServer.internal.ogtip.com ([fe80::3172:5dd:b7db:487b]) by ExchangeServer.internal.ogtip.com ([fe80::3172:5dd:b7db:487b%20]) with mapi id 14.03.0123.003; Tue, 25 Aug 2015 10:52:29 +0100 From: Luke Goodsell To: Achim Gratz , "cygwin@cygwin.com" Subject: RE: Perl Term::ReadKey from empty scalar Segfaults under cygwin only (1.7.32 x86_64) Date: Tue, 25 Aug 2015 09:52:00 -0000 Message-ID: <59C49FE16E416F46873F86D530DA80520BD7A0@ExchangeServer.internal.ogtip.com> References: <59C49FE16E416F46873F86D530DA80520BD519@ExchangeServer.internal.ogtip.com> In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00425.txt.bz2 Hi Achim, > The stacktrace is useless, but if you run this under strace you'll also s= ee a message that doesn't make it to the output otherwise: That arises from the subsequent print statement, which is never reached und= er cygwin. Alternative command that eliminates that warning: perl -MTerm::ReadKey -we 'my $input =3D ""; open(my $stdin, "<", \$input) o= r die "failed to open: $!"; local *STDIN =3D $stdin; ReadMode "raw"; my $re= sponse =3D ReadKey(1, \*STDIN); ReadMode "normal"; if(defined($response)) {= print "Got \"$response\"\n"; } else { print "Got undef\n"; }' > Please report this upstream. To whom would that be? Perl devs? Kind regards, Luke -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple