Redirected stdout don't work on child process on Windows
A file created in Ruby and redirected to stdout don't work properly on child process in 1.9.x.
ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]
In 1.9.1p243 and 1.9.2dev
I noticed the root cause is FILE_FLAG_OVERLAPPED handling of
ruby 1.9.x. I guess it is related with the select and native thread supporting
on Windows. But the child process cannot handle the overlapped
I/O on most cases.
In short, the inheritable file handle must not opened with the