in reply to Re^2: waitpid on Win32 ... wait forever
in thread waitpid on Win32 ... wait forever

You're right. You'd have to doing something like:

my $t1 = async{ 1 while <$out> }; my $t2 = async{ 1 while <$err> }; $_->join for $t1, $t2; ...

However, if your redirecting stdout to stderr, is there any point in reading stdout? And if you're going to discard the output without looking at it, why not just dump the whole lot to nul and have done with it?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^4: waitpid on Win32 ... wait forever
by ikegami (Patriarch) on May 08, 2009 at 15:56 UTC

    However, if your redirecting stdout to stderr,

    It was the mininal change required to send a known-sufficient amount of data to STDERR. Since open3 is used, input from both STDOUT and STDERR is probably expected in the actual situation where this is used.