From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88430 invoked by alias); 25 Aug 2015 09:17:01 -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 88420 invoked by uid 89); 25 Aug 2015 09:17:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f176.google.com Received: from mail-wi0-f176.google.com (HELO mail-wi0-f176.google.com) (209.85.212.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 25 Aug 2015 09:16:59 +0000 Received: by wicja10 with SMTP id ja10so8668176wic.1 for ; Tue, 25 Aug 2015 02:16:56 -0700 (PDT) X-Received: by 10.180.39.229 with SMTP id s5mr3133333wik.58.1440494216696; Tue, 25 Aug 2015 02:16:56 -0700 (PDT) Received: from [172.21.188.129] ([62.154.173.198]) by smtp.googlemail.com with ESMTPSA id ul1sm27086141wjc.30.2015.08.25.02.16.55 for (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Aug 2015 02:16:56 -0700 (PDT) Subject: Re: Perl Term::ReadKey from empty scalar Segfaults under cygwin only (1.7.32 x86_64) To: cygwin@cygwin.com References: <59C49FE16E416F46873F86D530DA80520BD519@ExchangeServer.internal.ogtip.com> From: Marco Atzeri Message-ID: <55DC3284.7010003@gmail.com> Date: Tue, 25 Aug 2015 09:17:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <59C49FE16E416F46873F86D530DA80520BD519@ExchangeServer.internal.ogtip.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00421.txt.bz2 On 25/08/2015 10:48, Luke Goodsell wrote: > perl -MTerm::ReadKey -e 'my $input = ""; open(my $stdin, "<", \$input) or die "failed to open: $!"; local *STDIN = $stdin; ReadMode "raw"; my $response = ReadKey(1, \*STDIN); ReadMode "normal"; print "Got \"$response\"\n"; I will bet in a lack of string end somewhere. $ perl -MTerm::ReadKey -E 'my $input = "\0" ; open(my $stdin, "<", \$input) or die "failed to open: $!"; local *STDIN = $stdin; ReadMode "raw"; my $response = ReadKey(1, \*STDIN); ReadMode "normal"; print "Got \"$response\"\n";' Got "" -- 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