This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Perl v5.8.7, CygWin DLL 1.5.18, script runs differently (hangs) on Cygwin while running open FH, "netsh ...|" or die "..."
- From: "Herb Martin" <HerbM at learnquick dot com>
- To: <cygwin at cygwin dot com>
- Date: Tue, 16 Aug 2005 03:13:51 -0500
- Subject: RE: Perl v5.8.7, CygWin DLL 1.5.18, script runs differently (hangs) on Cygwin while running open FH, "netsh ...|" or die "..."
> > #!/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/