On 9/21/06, Ovid <[EMAIL PROTECTED]> wrote:
----- Original Message ----
From: demerphq <[EMAIL PROTECTED]>

> There is no problem if you do the backtick method I mentioned.
>
> my $in_sync=`someprocess 2>&1`;
>
> and it should be in sync. I seem to recall it has to be, but i cant
> find the source of that claim. But i know that ive never seen any
> synchronization problems with this approach.

There is one serious problem with that:  my process blocks until that's done.  
Infinite streams won't work even though we've documented that they should.  
Even long-running tests appear to hang.  We also lose the ability to process 
test results as they come in.  We have to wait until all of the results come in 
and that may or may not happen.

Well then forget about synchronized two-channel communications. You
can't have everything in this world. :-)

Also, is that syntax portable across all operating systems which Perl runs on?  
I can't tell from the docs.

Hmm, all operating systems? I dont know. Id guess that a conformant
Perl implementation for a given OS will do some magic with that type
of construct, but I'm not sure. Im pretty sure its used in blead test
suite tho.

> So I guess it comes down to whats more important: A test counter being
> shown or handling STDOUT/STDERR in a synchronized fashion?

More than just a test counter :)

Ok. Whatever. :-)

--
perl -Mre=debug -e "/just|another|perl|hacker/"

Reply via email to