Searched refs:masterfd (Results 1 – 4 of 4) sorted by relevance
/external/ltp/testcases/kernel/pty/ |
D | ptem01.c | 56 int masterfd, slavefd; in test1() local 61 masterfd = open(MASTERCLONE, O_RDWR); in test1() 62 if (masterfd < 0) { in test1() 66 slavename = ptsname(masterfd); in test1() 71 if (grantpt(masterfd) != 0) { in test1() 75 if (unlockpt(masterfd) != 0) { in test1() 123 if (close(masterfd) != 0) { in test1() 137 int masterfd, slavefd; in test2() local 143 masterfd = open(MASTERCLONE, O_RDWR); in test2() 144 if (masterfd < 0) { in test2() [all …]
|
D | pty01.c | 75 int masterfd; /* master pty fd */ in test1() local 81 masterfd = open(MASTERCLONE, O_RDWR); in test1() 82 if (masterfd < 0) { in test1() 86 slavename = ptsname(masterfd); in test1() 91 if (grantpt(masterfd) != 0) { in test1() 111 if (unlockpt(masterfd) != 0) { in test1() 123 if (write(masterfd, STRING, strlen(STRING)) != strlen(STRING)) { in test1() 149 if (read(masterfd, buf, strlen(STRING)) != strlen(STRING)) { in test1() 171 if (ioctl(masterfd, TIOCGWINSZ, NULL) == 0) { in test1() 183 if (close(masterfd) != 0) { in test1() [all …]
|
D | hangup01.c | 88 void parent(int masterfd, int childpid) in parent() argument 98 pollfds[0].fd = masterfd; in parent() 104 if (read(masterfd, buf, len) == -1) { in parent() 158 int child(int masterfd) in child() argument 163 if ((slavename = ptsname(masterfd)) == NULL) { in child() 211 int masterfd; /* master pty fd */ in main() local 216 masterfd = open(MASTERCLONE, O_RDWR); in main() 217 if (masterfd < 0) in main() 220 slavename = ptsname(masterfd); in main() 224 if (grantpt(masterfd) != 0) in main() [all …]
|
/external/autotest/client/deps/fakemodem/src/ |
D | fakemodem.c | 23 int masterfd; variable 290 masterfd = posix_openpt (O_RDWR | O_NOCTTY); in main() 292 if (masterfd == -1 in main() 293 || grantpt (masterfd) == -1 in main() 294 || unlockpt (masterfd) == -1 in main() 295 || (slavedevice = ptsname (masterfd)) == NULL) in main() 302 tcgetattr (masterfd, &t); in main() 304 tcsetattr (masterfd, TCSANOW, &t); in main() 306 ioc = g_io_channel_unix_new (masterfd); in main() 391 rval = write (masterfd, line, term); in master_read() [all …]
|