Perl v5.8.7, CygWin DLL 1.5.18, script runs differently (hangs) on Cygwin while running open FH, "netsh ...|" or die "..."
Herb Martin
HerbM@learnquick.com
Tue Aug 16 08:13:00 GMT 2005
> > #!/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/
More information about the Cygwin
mailing list