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
Sun Aug 14 16:18:00 GMT 2005


Is this Perl, Bash, CygWin, NetSh, or something that I have
done wrong in the script?

Summary:
========
Two commands run fine from cygwin OR windows shell
prompts but a specific "netsh" command hangs when used 
from Perl under CygWin:

	net share
	netsh ipsec static show all format=table
	  (ipsec sub-command only runs on Windows 2003)

	Also, "netsh  interface show interface"
	  ...works correctly from both command line AND
		Perl.

[I am leaning on a problem with "netsh" but want the
opinion of the cygwin experts...and if no solution,
perhaps a debug strategy could be suggested.]

Versions:
=========
Cygwin DLL version info:  DLL version: 1.5.18
GNU bash, version 3.00.16(11)-release (i686-pc-cygwin)
Perl for Cygwin:
    This is perl, v5.8.7 built for cygwin-thread-multi-64int
    osname=cygwin, osvers=1.5.18(0.13242),
archname=cygwin-thread-multi-64int
Microsoft Windows [Version 5.2.3790]

Runs from CMD.exe with Perl for native Windows:
	Perl v5.8.7 built for MSWin32-x86-multi-thread


Test Script to reproduce:
=========================
The following test script hangs under CygWin Bash and run
to completion under Windows (CMD.exe) -- both command lines
run fine when run from the respective shell prompts (not
in Perl), even when redirected to a file or piped to another
command (more, grep, etc.):

#!/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>) {
  print;
}
#################end test script ##################


Is this Perl, Bash, CygWin, or something that I have
done wrong in the script?

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