fix child blocked on simultaneous read/write attempt

This fix was not applicable to standard I/O redirected to socket,
because non-overlapped ReadFile(s)/WriteFile(s) fail on overlapped
socket which we have now.