Thanks for pointing that out.  I had forgotten the backstory on it.

It strongly implies that the I/O redirection must be done BEFORE the fork() call on Windows, as it seems that fork() communicates stdio to exec() inside Perl. Time for test cases...

--
Rocco Caputo - rcap...@pobox.com


On Oct 2, 2009, at 09:12, Andrew Feren wrote:

Hi all,

If it helps anyone the original discussion about adding the Win32::Console::_SetStdHandle() and related changes can be found here. It seems pretty clear that a lot effort went into trying to get the original patch right.

I'd really love understand why this code is needed (on not). So far all of my tests have performed identically (other than the leak) with or without the _SetStdHandle() calls.

-Andrew

Rocco Caputo wrote:

First, thanks to Andrew Feren, POE::Wheel::Run::Win32 has been merged into POE::Wheel::Run.

Andrew has also reported a memory leak POE::Wheel::Run under Windows: https://rt.cpan.org/Ticket/Display.html?id=50068

My problem is that I don't know Win32 APIs well enough to say whether his patch does any harm. He's bypassing Win32::Console::_SetStdHandle() calls that set STDIN, STDOUT and STDERR to the pipes that communicate with the parent process. It seems like reasonable code, but I don't know any better.

Any help would be appreciated.

Thank you.


Reply via email to