Mail Archives: cygwin/2005/10/06/08:51:32
Here is a description of my problem. I have two different
installations of Cygwin on different systems :
System 1 System 2
-------- --------
cygwin 1.5.11-1 cygwin 1.5.18-1
perl 5.8.5-3 perl 5.8.6-4 (or 5.8.7-..)
Windows 2000 Windows 2003 Server
Windows XP
I have certain programs which run the following code (very condensed)
as a wrapper program :
open $proc, "$cmd|";
while (<$proc>) {
# E.g.
print $_;
}
close $proc;
Under system 1 (the old system) this does what it must do, regardless
if I run Cygwin programs or Windows programs. I can catch the output
of the subprocess and do something with it in parallel in the 'while'
loop (eg. write the output to a log file, and to STDOUT and process it
to extract data).
I have now installed a new environment on Windows 2003 server,
and what now happens is that the output of the started process
is only read and processed after the subprocess terminates.
Nothing else has changed, the scripts which do all the work
are exactly the same.
I have tested the above code on both systems and watched the
processes with procexp. What strikes me as odd is that on the first
system have a process tree like this :
perl
sh
sh
perl (In case I start ActiveState Perl here)
On the second system I have a process tree like :
perl
sh
perl (like above)
This issue is not blocking for me, because I can run the necessary
programs without my Perl wrapper, but the wrapper adds functionality
which cannot be added to the program being run.
Any ideas ?
Regards,
Jurgen
--
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/
- Raw text -