Lines Matching refs:master_fd
5939 int master_fd = -1, slave_fd = -1; in os_openpty_impl() local
5951 if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0) in os_openpty_impl()
5954 if (_Py_set_inheritable(master_fd, 0, NULL) < 0) in os_openpty_impl()
5960 slave_name = _getpty(&master_fd, O_RDWR, 0666, 0); in os_openpty_impl()
5963 if (_Py_set_inheritable(master_fd, 0, NULL) < 0) in os_openpty_impl()
5971 master_fd = open(DEV_PTY_FILE, O_RDWR | O_NOCTTY); /* open master */ in os_openpty_impl()
5972 if (master_fd < 0) in os_openpty_impl()
5978 if (grantpt(master_fd) < 0) { in os_openpty_impl()
5984 if (unlockpt(master_fd) < 0) { in os_openpty_impl()
5991 slave_name = ptsname(master_fd); /* get name of slave */ in os_openpty_impl()
5999 if (_Py_set_inheritable(master_fd, 0, NULL) < 0) in os_openpty_impl()
6011 return Py_BuildValue("(ii)", master_fd, slave_fd); in os_openpty_impl()
6016 if (master_fd != -1) in os_openpty_impl()
6017 close(master_fd); in os_openpty_impl()
6041 int master_fd = -1; in os_forkpty_impl() local
6045 pid = forkpty(&master_fd, NULL, NULL, NULL); in os_forkpty_impl()
6055 return Py_BuildValue("(Ni)", PyLong_FromPid(pid), master_fd); in os_forkpty_impl()