in reply to Windows filehandles and fork

According to Selecting on STDIN in Win32 and my own experience, on Windows select only works on sockets. You can work around this problem by creating a socket with socketpair, and using that instead.

I have some sample code for a very similar problem in Windows weirdness after fork, dup2.