Lines Matching refs:ttyfd
127 static int ttyfd; /* Serial port file descriptor */ variable
590 ttyfd = real_ttyfd; in connect_tty()
591 if ((fdflags = fcntl(ttyfd, F_GETFL)) == -1 in connect_tty()
592 || fcntl(ttyfd, F_SETFL, fdflags & ~O_NONBLOCK) < 0) in connect_tty()
603 if (fstat(ttyfd, &statbuf) < 0 in connect_tty()
604 || fchmod(ttyfd, statbuf.st_mode & ~(S_IWGRP | S_IWOTH)) < 0) { in connect_tty()
620 set_up_tty(ttyfd, ((connector != NULL && connector[0] != 0) in connect_tty()
669 int fd = dup(ttyfd); in connect_tty()
675 ttyfd = pty_slave; in connect_tty()
692 if (device_script(initializer, ttyfd, ttyfd, 0) < 0) { in connect_tty()
705 if (device_script(connector, ttyfd, ttyfd, 0) < 0) { in connect_tty()
747 if (device_script(welcomer, ttyfd, ttyfd, 0) < 0) in connect_tty()
759 return ttyfd; in connect_tty()
769 ttyfd = -1; in connect_tty()
782 if (device_script(disconnect_script, ttyfd, ttyfd, 0) < 0) { in disconnect_tty()