Home
last modified time | relevance | path

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

/freebsd-10-stable/crypto/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
119 ioctl(*ttyfd, TCSETCTTY, NULL); in pty_make_controlling_tty()
123 close(*ttyfd); in pty_make_controlling_tty()
124 *ttyfd = fd; in pty_make_controlling_tty()
150 if (ioctl(*ttyfd, TIOCSCTTY, NULL) < 0) in pty_make_controlling_tty()
Dreadpass.c122 int rppflags, use_askpass = 0, ttyfd; in read_passphrase() local
134 ttyfd = open(_PATH_TTY, O_RDWR); in read_passphrase()
135 if (ttyfd >= 0) in read_passphrase()
136 close(ttyfd); in read_passphrase()
Dsession.c656 int fdout, ptyfd, ttyfd, ptymaster; in do_exec_pty() local
662 ttyfd = s->ttyfd; in do_exec_pty()
673 close(ttyfd); in do_exec_pty()
680 close(ttyfd); in do_exec_pty()
692 close(ttyfd); in do_exec_pty()
708 pty_make_controlling_tty(&ttyfd, s->tty); in do_exec_pty()
711 if (dup2(ttyfd, 0) < 0) in do_exec_pty()
713 if (dup2(ttyfd, 1) < 0) in do_exec_pty()
715 if (dup2(ttyfd, 2) < 0) in do_exec_pty()
719 close(ttyfd); in do_exec_pty()
[all …]
Dsession.h41 int ptyfd, ttyfd, ptymaster; member
Dmonitor.c1513 if (s->ttyfd != -1) { in mm_session_close()
1536 res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty)); in mm_answer_pty()
1545 if (dup2(s->ttyfd, 0) == -1) in mm_answer_pty()
1560 mm_send_fd(sock, s->ttyfd) == -1) in mm_answer_pty()
1570 close(s->ttyfd); in mm_answer_pty()
1571 s->ttyfd = s->ptyfd; in mm_answer_pty()
1575 debug3("%s: tty %s ptyfd %d", __func__, s->tty, s->ttyfd); in mm_answer_pty()
Dmonitor_wrap.c499 mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) in mm_pty_allocate() argument
541 (*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1) in mm_pty_allocate()
553 if (s->ttyfd == -1) in mm_session_pty_cleanup2()
566 s->ttyfd = -1; in mm_session_pty_cleanup2()
Dconfigure.ac2215 int fd, ptyfd, ttyfd, status;
2229 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
/freebsd-10-stable/bin/pax/
Dtty_subs.c69 int ttyfd; in tty_init() local
71 if ((ttyfd = open(DEVTTY, O_RDWR)) >= 0) { in tty_init()
72 if ((ttyoutf = fdopen(ttyfd, "w")) != NULL) { in tty_init()
73 if ((ttyinf = fdopen(ttyfd, "r")) != NULL) in tty_init()
77 (void)close(ttyfd); in tty_init()
/freebsd-10-stable/sbin/conscontrol/
Dconscontrol.c158 int ttyfd; in consset() local
160 ttyfd = open(devnam, O_RDONLY); in consset()
161 if (ttyfd == -1) in consset()
163 if (ioctl(ttyfd, TIOCCONS, &flag) == -1) in consset()
166 close(ttyfd); in consset()
/freebsd-10-stable/bin/sh/
Djobs.c86 static int ttyfd = -1; variable
129 if (ttyfd != -1) in setjobctl()
130 close(ttyfd); in setjobctl()
131 if ((ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC)) < 0) { in setjobctl()
136 (ttyfd = fcntl(i, F_DUPFD_CLOEXEC, 10)) < 0) in setjobctl()
139 if (ttyfd < 10) { in setjobctl()
144 if ((i = fcntl(ttyfd, F_DUPFD_CLOEXEC, 10)) < 0) { in setjobctl()
145 close(ttyfd); in setjobctl()
146 ttyfd = -1; in setjobctl()
149 close(ttyfd); in setjobctl()
[all …]
/freebsd-10-stable/usr.bin/patch/
Dutil.c274 static int ttyfd = -1; in ask() local
280 if (ttyfd < 0) in ask()
281 ttyfd = open(_PATH_TTY, O_RDONLY); in ask()
282 if (ttyfd >= 0) { in ask()
283 if ((nr = read(ttyfd, buf, buf_size)) > 0 && in ask()
287 if (ttyfd < 0 || nr <= 0) { in ask()
/freebsd-10-stable/usr.sbin/bhyve/
Duart_emul.c92 struct ttyfd { struct
115 struct ttyfd tty; argument
133 ttyopen(struct ttyfd *tf) in ttyopen()
150 ttyread(struct ttyfd *tf) in ttyread()
161 ttywrite(struct ttyfd *tf, unsigned char wb) in ttywrite()
/freebsd-10-stable/crypto/heimdal/appl/telnet/telnetd/
Dsys_term.c165 static int ttyfd = -1; variable
189 tcgetattr(ttyfd, &termbuf); in init_termbuf()
205 tcsetattr(ttyfd, TCSANOW, &termbuf); in set_termbuf()
858 ttyfd = t; in getptyslave()
/freebsd-10-stable/contrib/ntp/ntpd/
Drefclock_oncore.c272 int ttyfd; /* TTY file descriptor */ member
719 instance->ttyfd = fd1; in oncore_start()
791 close(instance->ttyfd); in oncore_shutdown()
793 if ((instance->ppsfd != -1) && (instance->ppsfd != instance->ttyfd)) in oncore_shutdown()
3534 write(instance->ttyfd, cp, n); in oncore_load_almanac()
3549 write(instance->ttyfd, cp, n); in oncore_load_almanac()
3758 fd = instance->ttyfd; in oncore_sendmsg()