Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@sources.redhat.com Delivered-To: mailing list cygwin@sources.redhat.com Message-Id: <4.3.1.2.20010119112325.02238b08@pop.ma.ultranet.com> X-Sender: lhall@pop.ma.ultranet.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Date: Fri, 19 Jan 2001 11:23:59 -0500 To: dkarr@tcsi.com (David M. Karr), cygwin@sourceware.cygnus.com From: "Larry Hall (RFK Partners, Inc)" Subject: Re: Perl backtick childprocs hang after completion In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 07:57 PM 1/18/2001, David M. Karr wrote: >I'm seeing a weird symptom with the child process belonging to a >backtick command in Cygwin Perl. > >I wrote a little Perl script that just takes a command line to run, >captures the output, and replaces "\\" with "/". The vast majority of >the time, it seems to work fine. > >However, either because of the command I'm wrapping ("cleartool lsvt >-a dirname"), or the directory I'm running it in, or something about >the output it produces, it will sometimes just "hang" after calling >the child process. > >I accidently discovered that if I use Task Manager to manually kill >the child process, then the backtick finishes, and the captured output >is exactly what it's supposed to be. So it appears that all the >output was produced, but it somehow hung trying to end the child >process. > >When I run this on a set of directories, it always hangs on the same >ones. I looked at the output which is produced by each directory in >the list I'm trying, and the ones that are failing represent the ones >with the most number of lines of output, although they only range from >36-197 lines. However, there is one other that produces 36 lines of >output, and that one does NOT fail. > >I tried storing the lines of output that "hang" into a file and >changing the backticked command to "cat thefile", and doesn't hang. > >I'm quite confused. What could be going on here? Running strace on the Perl process might shed some light on your problem. Larry Hall lhall@rfk.com RFK Partners, Inc. http://www.rfk.com 118 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple