This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Perl backtick childprocs hang after completion


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?

-- 
===================================================================
David M. Karr     ; w:(425)487-8312     ; TCSI & Best Consulting
dkarr@tcsi.com    ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]