delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/15/12:51:29

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
From: "Herb Martin" <HerbM AT learnquick DOT com>
To: <cygwin AT cygwin DOT com>
Subject: FW: Cygwin perl hangs with open FH, "... |"
Date: Mon, 15 Aug 2005 11:50:42 -0500
MIME-Version: 1.0
Message-ID: <EIL9W44-0001P4-HA@mail2.learnquick.com>
X-Sign-LQC: HerbM AT learnquick DOT com/2005-08-15 11:50:28/<cygwin AT cygwin DOT com>=vygkzqmy

 
I received a (welcome) off-list reply to my report of 
trouble running CygWin Perl and piping the output of
an open FILEHANDLE call to capture the output.

Interesting his reproduction of the problem uses other
programs so it is NOT just netsh (although these could
conceivably be unrelated it seems doubtful).

(FYI:  I am avoiding the problem by redirecting the output
to a temporary file then reading in the results -- obviously
not as clean a solution:
  my $ipsec = '/tmp/ipsxxxx.txt';
  system "netsh ipsec static show all format=table >$ipsec";
  open IPSEC, "<$ipsec" or die "Cannot open $ipsec: $!\n";
)

The offlist message is attached inline (with permission) here:


From: Jerome Zago [mailto:] 
Sent: Monday, August 15, 2005 11:06 AM
To: Herb Martin
Subject: RE: Cygwin perl hangs with open FH, "... |"

Hi, I can reproduce this problem, and this used to work before as well.

Cygwin, GNU bash, Perl: same versions.
ccm: 6.3 SP4
ruby: 1.8.2 [i386-mswin32]

jza AT W1566$ ccm rt -show info 'COM9:Insulated Development' | wc
     13      48     481

jza AT W1566$ perl -e "open FH, 'ccm rt -show info \'COM9:Insulated
Development\' |'; print while <FH>" | wc
     13      48     481

jza AT W1566$ ccm rt -list | wc
    631    1896   37229

jza AT W1566$ perl -e "open FH, 'ccm rt -list |'; print while <FH>" | wc
[hangs]

jza AT W1566$ perl -e "open FH, 'ruby -e \'system \"ccm rt -list\"\' |'; print
while <FH>" | wc
    631    1896   37229

I don't get it... Note that ccm and ruby are both native binaries.

Feel free to forward this message to the mailing-list (I'm not subscribed).



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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