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=Uz7+v5SWjmqupo080plVeP9xTMoxr
	6vvlvw0jPBmL48Kc+KGgoVVWTfqnX+JTv8koHjK8y+9nNmahg/HUdj0Qus3DkuPT
	I4X2UN+OcLUhx7GDlIwBgqNUlf0mEeE3mfRK/V6Sun02Lhcrcs7GKfXKVnMwp7oq
	9LDtNWX4HDQ1O8=
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=8JF4hJgHhq64DLYJ1IsOXr5IO38=; b=mp4
	t+qMLklRKFAnlQmT1RXWgyEzrrq1VSB/wITzo5bH9LFwvDMeYIqlet9Q7A326hRK
	BzC65781hS/XG8SbQ6OtrwQwRxMSWYv8qG29Gus7ejj5x6NHmFp+2mwcM+OQEYG2
	tCNWsp/Z7RgTmXWw9DRYg0TTltSV0QrtEDx5DcCI=
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=3.2 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2
X-HELO: mx1.ogt.co.uk
From: Luke Goodsell <Luke.Goodsell@ogt.com>
To: Marco Atzeri <marco.atzeri@gmail.com>,
        "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:43:04 +0000
Message-ID: <59C49FE16E416F46873F86D530DA80520BD78C@ExchangeServer.internal.ogtip.com>
References: <59C49FE16E416F46873F86D530DA80520BD519@ExchangeServer.internal.ogtip.com> <55DC3284.7010003@gmail.com>
In-Reply-To: <55DC3284.7010003@gmail.com>
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 t7P9hQxq005822

Hi Marco,

>   $ 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 ""

I get:

> Got " "

... whereas I would expect an empty string.

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


