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:from:to:subject:date:message-id:references :in-reply-to:content-type:content-transfer-encoding :mime-version; q=dns; s=default; b=bH6a+4eAeUvdiNWMbD+HseEw3n2sj K8ALDZkFzj1sY1LI1CsEpeHzBipAcrjYuRBMxAUKL2q4D8noZk9j4Osnbgm5Y1j/ wX1Q1A/hZLmdKfGxIHfSrmZ//VabrGxnCzHJoQowtSbI72LI5hG7TH6yGQpuccm3 PcgzKjZsuG72XA= 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:from:to:subject:date:message-id:references :in-reply-to:content-type:content-transfer-encoding :mime-version; s=default; bh=hNHIGA8fUvLvgCezGqnx1Fs3eY8=; b=BFe eE641TErdpoWE/N84IhZ8J+4ziNIFhjvubtEn1lo/c7dKF3LvGRI5x1szgN+6Dht steGE8KIPyq3mXEhr7FbjV5Lw8Ez1ytVjSjkVNSIZ5Eh50o1opCmj+I/xqtrnc4I V8RcA8uB6kkiow4XEWBrWmZrKEKNvrgswgG6RJXY= 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=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 From: Luke Goodsell To: Achim Gratz , "cygwin AT cygwin DOT 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:28 +0000 Message-ID: <59C49FE16E416F46873F86D530DA80520BD7A0@ExchangeServer.internal.ogtip.com> References: <59C49FE16E416F46873F86D530DA80520BD519 AT ExchangeServer DOT internal DOT ogtip DOT com> In-Reply-To: Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t7P9qlXV006610 Hi Achim, > The stacktrace is useless, but if you run this under strace you'll also see a message that doesn't make it to the output otherwise: That arises from the subsequent print statement, which is never reached under cygwin. Alternative command that eliminates that warning: perl -MTerm::ReadKey -we 'my $input = ""; open(my $stdin, "<", \$input) or die "failed to open: $!"; local *STDIN = $stdin; ReadMode "raw"; my $response = 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