Lines Matching refs:master_fd
6574 int master_fd = -1, slave_fd = -1; in os_openpty_impl() local
6586 if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0) in os_openpty_impl()
6589 if (_Py_set_inheritable(master_fd, 0, NULL) < 0) in os_openpty_impl()
6595 slave_name = _getpty(&master_fd, O_RDWR, 0666, 0); in os_openpty_impl()
6598 if (_Py_set_inheritable(master_fd, 0, NULL) < 0) in os_openpty_impl()
6606 master_fd = open(DEV_PTY_FILE, O_RDWR | O_NOCTTY); /* open master */ in os_openpty_impl()
6607 if (master_fd < 0) in os_openpty_impl()
6613 if (grantpt(master_fd) < 0) { in os_openpty_impl()
6619 if (unlockpt(master_fd) < 0) { in os_openpty_impl()
6626 slave_name = ptsname(master_fd); /* get name of slave */ in os_openpty_impl()
6634 if (_Py_set_inheritable(master_fd, 0, NULL) < 0) in os_openpty_impl()
6646 return Py_BuildValue("(ii)", master_fd, slave_fd); in os_openpty_impl()
6651 if (master_fd != -1) in os_openpty_impl()
6652 close(master_fd); in os_openpty_impl()
6676 int master_fd = -1; in os_forkpty_impl() local
6684 pid = forkpty(&master_fd, NULL, NULL, NULL); in os_forkpty_impl()
6694 return Py_BuildValue("(Ni)", PyLong_FromPid(pid), master_fd); in os_forkpty_impl()