Emulate os.dup() on Windows
Emulate socket.socketpair() on Windows