Home
last modified time | relevance | path

Searched refs:masterfd (Results 1 – 4 of 4) sorted by relevance

/external/ltp/testcases/kernel/pty/
Dptem01.c57 int masterfd, slavefd; in test1() local
62 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test1()
64 slavename = ptsname(masterfd); in test1()
69 if (grantpt(masterfd) != 0) { in test1()
73 if (unlockpt(masterfd) != 0) { in test1()
121 if (close(masterfd) != 0) { in test1()
135 int masterfd, slavefd; in test2() local
141 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test2()
143 slavename = ptsname(masterfd); in test2()
148 if (grantpt(masterfd) != 0) { in test2()
[all …]
Dpty01.c76 int masterfd; /* master pty fd */ in test1() local
82 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test1()
84 slavename = ptsname(masterfd); in test1()
89 if (grantpt(masterfd) != 0) { in test1()
112 if (unlockpt(masterfd) != 0) { in test1()
121 if (write(masterfd, STRING, strlen(STRING)) != strlen(STRING)) { in test1()
147 if (read(masterfd, buf, strlen(STRING)) != strlen(STRING)) { in test1()
169 if (ioctl(masterfd, TIOCGWINSZ, NULL) == 0) { in test1()
181 if (close(masterfd) != 0) { in test1()
194 int masterfd; /* master pty fd */ in test2() local
[all …]
Dhangup01.c89 void parent(int masterfd, int childpid) in parent() argument
99 pollfds[0].fd = masterfd; in parent()
105 if (read(masterfd, buf, len) == -1) { in parent()
159 int child(int masterfd) in child() argument
164 if ((slavename = ptsname(masterfd)) == NULL) { in child()
212 int masterfd; /* master pty fd */ in main() local
217 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in main()
219 slavename = ptsname(masterfd); in main()
223 if (grantpt(masterfd) != 0) in main()
226 if (unlockpt(masterfd) != 0) in main()
[all …]
/external/autotest/client/deps/fakemodem/src/
Dfakemodem.c23 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 …]