Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Mon, 15 Aug 2005 23:15:39 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Herb Martin cc: 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 "..." In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 14 Aug 2005, Herb Martin wrote: > 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 () { > 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 () { ^^^^^^^^ Is there a particular reason you open one filehandle, but read from another? Igor > print; > } > #################end test script ################## > > Is this Perl, Bash, CygWin, or something that I have > done wrong in the script? -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! If there's any real truth it's that the entire multidimensional infinity of the Universe is almost certainly being run by a bunch of maniacs. /DA -- 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/