delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/16/04:14:03

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: RE: Perl v5.8.7, CygWin DLL 1.5.18, script runs differently (hangs) on Cygwin while running open FH, "netsh ...|" or die "..."
Date: Tue, 16 Aug 2005 03:13:51 -0500
MIME-Version: 1.0
In-Reply-To: <Pine.GSO.4.61.0508152314180.9560@slinky.cs.nyu.edu>
Message-ID: <EILB2UQ-0005VS-A8@mail2.learnquick.com>
X-Sign-LQC: HerbM AT learnquick DOT com/2005-08-16 03:13:37/<cygwin AT cygwin DOT com>=sosbljzr

> > #!/usr/bin/perl -w
> > open(NETSHARE, "net share |") or die "Can't run net share: $!\n"; 
> > print "we got through the call to 'net share'\n"; while 
> (<NETSHARE>) {
> >   print;
> > }
> >
> > open(IPSEC, "netsh ipsec static show all format=table |") or die 
> > "Can't run
> > netsh: $!\n";
> > print "we got through the call to 'netsh'\n"; while (<NETSHARE>) {
>           ^^^^^^^^

No, it's a type that I changed from using one name to
the other somewhere during the preparation of the email
(and failed to recopy the code) -- The calls were 
symetric on everything that failed. 

The above code would not "hang" but would do nothing
after the "we got through..." print.

The first version read:
> > open(IPSEC, "netsh ipsec static show all format=table |") or die 
> > "Can't run
> > netsh: $!\n";
> > print "we got through the call to 'netsh'\n"; while (<IPSEC>) {

The current version now reads:
> > open(NETSH, "netsh ipsec static show all format=table |") or die 
> > "Can't run
> > netsh: $!\n";
> > print "we got through the call to 'netsh'\n"; while (<NETSH>) {

Both versions hang on the open with these netsh switches.

Usually I paste the actually tested code -- I apologize
for this mistake and the confusion.

--
Herb Martin


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