Lines Matching refs:masterfd
54 int masterfd, slavefd; in test1() local
59 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test1()
61 slavename = ptsname(masterfd); in test1()
66 if (grantpt(masterfd) != 0) { in test1()
70 if (unlockpt(masterfd) != 0) { in test1()
118 if (close(masterfd) != 0) { in test1()
132 int masterfd, slavefd; in test2() local
138 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test2()
140 slavename = ptsname(masterfd); in test2()
145 if (grantpt(masterfd) != 0) { in test2()
149 if (unlockpt(masterfd) != 0) { in test2()
157 if (ioctl(masterfd, TIOCSWINSZ, &wsz1) != 0) { in test2()
171 if (ioctl(masterfd, TIOCGWINSZ, &wsz) != 0) { in test2()
199 if (close(masterfd) != 0) { in test2()
213 int masterfd, slavefd; in test3() local
216 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test3()
218 slavename = ptsname(masterfd); in test3()
223 if (grantpt(masterfd) != 0) { in test3()
227 if (unlockpt(masterfd) != 0) { in test3()
235 if (tcsendbreak(masterfd, 10) != 0) { in test3()
247 if (close(masterfd) != 0) { in test3()
261 int masterfd, slavefd, slavefd2, slavefd3; in test4() local
264 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test4()
266 slavename = ptsname(masterfd); in test4()
271 if (grantpt(masterfd) != 0) { in test4()
275 if (unlockpt(masterfd) != 0) { in test4()
301 if (close(masterfd) != 0) { in test4()
317 static int masterfd[NUMOPENS]; in test5() local
323 masterfd[i] = open(MASTERCLONE, O_RDWR); in test5()
324 if (masterfd[i] < 0) { in test5()
328 if (masterfd[i] != 0) { in test5()
329 (void)close(masterfd[i]); in test5()
338 slavename = ptsname(masterfd[i]); in test5()
344 if (grantpt(masterfd[i]) != 0) { in test5()
349 if (unlockpt(masterfd[i]) != 0) { in test5()
365 if (close(masterfd[i]) != 0) { in test5()
380 static int masterfd; in test6() local
385 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test6()
387 slavename = ptsname(masterfd); in test6()
392 if (grantpt(masterfd) != 0) { in test6()
396 if (unlockpt(masterfd) != 0) { in test6()
417 if (close(masterfd) != 0) { in test6()