delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/08/25/05:43:31

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=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 AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=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 DOT Goodsell AT ogt DOT com>
To: Marco Atzeri <marco DOT atzeri AT gmail DOT com>,
"cygwin AT cygwin DOT com" <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:43:04 +0000
Message-ID: <59C49FE16E416F46873F86D530DA80520BD78C@ExchangeServer.internal.ogtip.com>
References: <59C49FE16E416F46873F86D530DA80520BD519 AT ExchangeServer DOT internal DOT ogtip DOT com> <55DC3284 DOT 7010003 AT gmail DOT com>
In-Reply-To: <55DC3284.7010003@gmail.com>
MIME-Version: 1.0
X-IsSubscribed: yes
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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019