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 [EMAIL PROTECTED] 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
Re: Perl backtick childprocs hang after completion
Larry Hall (RFK Partners, Inc) Fri, 19 Jan 2001 08:52:23 -0800
- Perl backtick childprocs hang after complet... David M. Karr
- Larry Hall (RFK Partners, Inc)