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

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=xv53Wv6JPhqHxkNh
EOgBgR5NFat227wVweI0uiU1VBTw07idEO05HeW5S8m6ChLrR+v921gmOzyBpxgr
IDh4rNEOREjiMlOG2OnWCgY31oRu0bsi0LOlv8CS5SZLQsJso89+oD97RxSao5F+
Jt64oDPpxCR6MxbEhyQ8ZpesVaM=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=0kY8zkDzYrMdk6IXU8zxJx
yBmaY=; b=NXnlnQsuMHUDKVkrE9jIjVQCkHClrKGp2bIddODYUDuuHZcGdqxDP0
0Ls8a2WVpdAIjS+df/YScFuRHGZvNwoeE5YU6i/aII2wKdQ4qjHYeHZs2gdi9rtH
+WAWgmYFce2INwN3apt5FXNoHwu+QRnhTpKU/deOWE2COtCAJP9+o=
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=-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
X-Received: by 10.180.39.229 with SMTP id s5mr3133333wik.58.1440494216696; 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 AT cygwin DOT com
References: <59C49FE16E416F46873F86D530DA80520BD519 AT ExchangeServer DOT internal DOT ogtip DOT com>
From: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
Message-ID: <55DC3284.7010003@gmail.com>
Date: Tue, 25 Aug 2015 11:16:52 +0200
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>
X-IsSubscribed: yes

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

- Raw text -


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