file descriptors returned by os.pipe() are from the same pool as file.fileno()
added dup and dup2