This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FW: Cygwin perl hangs with open FH, "... |"


 
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@W1566$ ccm rt -show info 'COM9:Insulated Development' | wc
     13      48     481

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

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

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

jza@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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]