'Issue #15798: Popen should work when stdio fds are available.'

def test_small_errpipe_write_fd(self):

    new_stdin = os.dup(0)
    new_stdout = os.dup(1)
    try:
        os.close(0)
        os.close(1)
        subprocess.Popen([sys.executable, '-c', "print('AssertionError:0:CLOEXEC    failure.')"]).wait()
    finally:
        os.dup2(new_stdin, 0)
        os.dup2(new_stdout, 1)
        os.close(new_stdin)
        os.close(new_stdout)
