Lines Matching refs:master
73 static int master, slave;
214 if (openpty(&master, &slave, NULL, NULL, NULL) == -1)
217 if (openpty(&master, &slave, NULL, &tt, &win) == -1)
221 fcm = fcntl(master, F_GETFL);
223 err(1, "master F_GETFL");
225 if (fcntl(master, F_SETFL, fcm) == -1)
226 err(1, "master F_SETFL");
301 FD_SET(master, &rfd);
305 FD_SET(master, &wfd);
318 n = pselect(master + 1, &rfd, &wfd, NULL, tvp, pselmask);
324 ioctl(master, TIOCSWINSZ, &win);
333 if (tcgetattr(master, &stt) == 0 &&
335 (void)write(master, &stt.c_cc[VEOF], 1);
349 if (n > 0 && FD_ISSET(master, &wfd)) {
351 cc = write(master, be->ibuf + be->rpos,
357 warn("write master");
362 if (kflg && tcgetattr(master, &stt) >= 0 &&
376 if (n > 0 && FD_ISSET(master, &rfd)) {
377 cc = read(master, obuf, sizeof(obuf));
433 (void)close(master);
473 (void)close(master);