/external/ltp/testcases/kernel/pty/ |
ptem01.c | 56 int masterfd, slavefd; local 61 masterfd = open(MASTERCLONE, O_RDWR); 62 if (masterfd < 0) { 66 slavename = ptsname(masterfd); 71 if (grantpt(masterfd) != 0) { 75 if (unlockpt(masterfd) != 0) { 123 if (close(masterfd) != 0) { 137 int masterfd, slavefd; local 143 masterfd = open(MASTERCLONE, O_RDWR); 144 if (masterfd < 0) 221 int masterfd, slavefd; local 272 int masterfd, slavefd, slavefd2, slavefd3; local 331 static int masterfd[NUMOPENS]; local 394 static int masterfd; local [all...] |
pty01.c | 75 int masterfd; /* master pty fd */ local 81 masterfd = open(MASTERCLONE, O_RDWR); 82 if (masterfd < 0) { 86 slavename = ptsname(masterfd); 91 if (grantpt(masterfd) != 0) { 111 if (unlockpt(masterfd) != 0) { 123 if (write(masterfd, STRING, strlen(STRING)) != strlen(STRING)) { 149 if (read(masterfd, buf, strlen(STRING)) != strlen(STRING)) { 171 if (ioctl(masterfd, TIOCGWINSZ, NULL) == 0) { 183 if (close(masterfd) != 0) 196 int masterfd; \/* master pty fd *\/ local 262 int masterfd; \/* master pty fd *\/ local 282 int masterfd; \/* master pty fd *\/ local 351 int masterfd; \/* master pty fd *\/ local [all...] |
hangup01.c | 88 void parent(int masterfd, int childpid) 98 pollfds[0].fd = masterfd; 104 if (read(masterfd, buf, len) == -1) { 158 int child(int masterfd) 163 if ((slavename = ptsname(masterfd)) == NULL) { 211 int masterfd; /* master pty fd */ local 216 masterfd = open(MASTERCLONE, O_RDWR); 217 if (masterfd < 0) 220 slavename = ptsname(masterfd); 224 if (grantpt(masterfd) != 0 [all...] |
/external/autotest/client/deps/fakemodem/src/ |
fakemodem.c | 23 int masterfd; variable 290 masterfd = posix_openpt (O_RDWR | O_NOCTTY); 292 if (masterfd == -1 293 || grantpt (masterfd) == -1 294 || unlockpt (masterfd) == -1 295 || (slavedevice = ptsname (masterfd)) == NULL) 302 tcgetattr (masterfd, &t); 304 tcsetattr (masterfd, TCSANOW, &t); 306 ioc = g_io_channel_unix_new (masterfd); 391 rval = write (masterfd, line, term) [all...] |