X-Recipient: archive-cygwin@delorie.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@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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 <Luke.Goodsell@ogt.com>
To: Achim Gratz <Stromeko@NexGo.DE>, "cygwin@cygwin.com" <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:28 +0000
Message-ID: <59C49FE16E416F46873F86D530DA80520BD7A0@ExchangeServer.internal.ogtip.com>
References: <59C49FE16E416F46873F86D530DA80520BD519@ExchangeServer.internal.ogtip.com> <loom.20150825T113314-983@post.gmane.org>
In-Reply-To: <loom.20150825T113314-983@post.gmane.org>
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


