Lines Matching defs:masterfd
73 int masterfd; /* master pty fd */
79 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR);
81 slavename = ptsname(masterfd);
86 if (grantpt(masterfd) != 0) {
109 if (unlockpt(masterfd) != 0) {
118 if (write(masterfd, STRING, strlen(STRING)) != strlen(STRING)) {
144 if (read(masterfd, buf, strlen(STRING)) != strlen(STRING)) {
166 if (ioctl(masterfd, TIOCGWINSZ, NULL) == 0) {
178 if (close(masterfd) != 0) {
191 int masterfd; /* master pty fd */
197 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR);
199 slavename = ptsname(masterfd);
204 if (grantpt(masterfd) != 0) {
208 if (unlockpt(masterfd) != 0) {
218 if (close(masterfd) != 0) {
251 int masterfd; /* master pty fd */
253 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR);
255 if (ioctl(masterfd, TIOCGWINSZ, NULL) == 0) {
268 int masterfd; /* master pty fd */
274 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR);
276 slavename = ptsname(masterfd);
281 if (grantpt(masterfd) != 0) {
285 if (unlockpt(masterfd) != 0) {
318 if (close(masterfd) != 0) {
331 int masterfd; /* master pty fd */
342 masterfd = open(MASTERCLONE, O_RDWR);
343 if (masterfd < 0) {
348 if (grantpt(masterfd) != 0) {
353 slavename = ptsname(masterfd);
360 if (close(masterfd) != 0) {