Issue #19752: Fix "HAVE_DEV_PTMX" implementation of os.openpty()

Regression introduced by the implementation of the PEP 446 (non-inheritable
file descriptors by default).

master_fd must be set non-inheritable after the creation of the slave_fd,
otherwise grantpt(master_fd) fails with EPERM (errno 13).
1 file changed