Home
last modified time | relevance | path

Searched refs:ttyfd (Results 1 – 9 of 9) sorted by relevance

/external/mtools/
Dtty.c24 static int ttyfd=-1; variable
83 #define STDIN ttyfd
178 ttyfd = open("/dev/tty", O_RDONLY); in opentty()
179 if(ttyfd >= 0) { in opentty()
180 tty = fdopen(ttyfd, "r"); in opentty()
188 ttyfd = 0; in opentty()
/external/ppp/pppd/
Dtty.c127 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()
[all …]
/external/openssh/
Dsshpty.c64 pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) in pty_allocate() argument
70 i = openpty(ptyfd, ttyfd, NULL, NULL, NULL); in pty_allocate()
75 name = ttyname(*ttyfd); in pty_allocate()
99 pty_make_controlling_tty(int *ttyfd, const char *tty) in pty_make_controlling_tty() argument
126 if (ioctl(*ttyfd, TIOCSCTTY, NULL) < 0) in pty_make_controlling_tty()
Dreadpass.c126 int rppflags, use_askpass = 0, ttyfd; in read_passphrase() local
139 ttyfd = open(_PATH_TTY, O_RDWR); in read_passphrase()
140 if (ttyfd >= 0) { in read_passphrase()
147 (void)write(ttyfd, &cr, 1); in read_passphrase()
148 close(ttyfd); in read_passphrase()
Dsession.c565 int fdout, ptyfd, ttyfd, ptymaster; in do_exec_pty() local
571 ttyfd = s->ttyfd; in do_exec_pty()
582 close(ttyfd); in do_exec_pty()
589 close(ttyfd); in do_exec_pty()
601 close(ttyfd); in do_exec_pty()
614 pty_make_controlling_tty(&ttyfd, s->tty); in do_exec_pty()
617 if (dup2(ttyfd, 0) == -1) in do_exec_pty()
619 if (dup2(ttyfd, 1) == -1) in do_exec_pty()
621 if (dup2(ttyfd, 2) == -1) in do_exec_pty()
625 close(ttyfd); in do_exec_pty()
[all …]
Dsession.h42 int ptyfd, ttyfd, ptymaster; member
Dmonitor.c1520 if (s->ttyfd != -1) { in mm_session_close()
1543 res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty)); in mm_answer_pty()
1553 if (dup2(s->ttyfd, 0) == -1) in mm_answer_pty()
1569 mm_send_fd(sock, s->ttyfd) == -1) in mm_answer_pty()
1579 close(s->ttyfd); in mm_answer_pty()
1580 s->ttyfd = s->ptyfd; in mm_answer_pty()
1584 debug3("%s: tty %s ptyfd %d", __func__, s->tty, s->ttyfd); in mm_answer_pty()
Dmonitor_wrap.c561 mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) in mm_pty_allocate() argument
607 (*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1) in mm_pty_allocate()
620 if (s->ttyfd == -1) in mm_session_pty_cleanup2()
635 s->ttyfd = -1; in mm_session_pty_cleanup2()
Dconfigure.ac2298 int fd, ptyfd, ttyfd, status;
2312 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);