Symbol: ttyfd
bin/pax/tty_subs.c
63
int ttyfd;
bin/pax/tty_subs.c
65
if ((ttyfd = open(DEVTTY, O_RDWR)) >= 0) {
bin/pax/tty_subs.c
66
if ((ttyoutf = fdopen(ttyfd, "w")) != NULL) {
bin/pax/tty_subs.c
67
if ((ttyinf = fdopen(ttyfd, "r")) != NULL)
bin/pax/tty_subs.c
71
(void)close(ttyfd);
bin/sh/jobs.c
1098
if (ttyfd >= 0 && tcsetpgrp(ttyfd, rootpid) < 0)
bin/sh/jobs.c
118
static int ttyfd = -1;
bin/sh/jobs.c
157
if (ttyfd >= 0) {
bin/sh/jobs.c
158
close(ttyfd);
bin/sh/jobs.c
159
ttyfd = -1;
bin/sh/jobs.c
180
if (ttyfd != -1)
bin/sh/jobs.c
181
close(ttyfd);
bin/sh/jobs.c
182
if ((ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC)) < 0) {
bin/sh/jobs.c
187
(ttyfd = fcntl(i, F_DUPFD_CLOEXEC, 10)) < 0) {
bin/sh/jobs.c
192
if (ttyfd < 10) {
bin/sh/jobs.c
197
if ((i = fcntl(ttyfd, F_DUPFD_CLOEXEC, 10)) < 0) {
bin/sh/jobs.c
201
close(ttyfd);
bin/sh/jobs.c
202
ttyfd = i;
bin/sh/jobs.c
205
initialpgrp = tcgetpgrp(ttyfd);
bin/sh/jobs.c
224
tcsetpgrp(ttyfd, rootpid);
bin/sh/jobs.c
227
if (ttyfd >= 0) {
bin/sh/jobs.c
228
tcsetpgrp(ttyfd, initialpgrp);
bin/sh/jobs.c
229
close(ttyfd);
bin/sh/jobs.c
230
ttyfd = -1;
bin/sh/jobs.c
256
if (ttyfd >= 0)
bin/sh/jobs.c
257
tcsetpgrp(ttyfd, pgrp);
bin/sh/jobs.c
927
ttyfd >= 0) {
bin/sh/jobs.c
934
if (tcsetpgrp(ttyfd, pgrp) < 0)
crypto/heimdal/appl/telnet/telnetd/sys_term.c
165
static int ttyfd = -1;
crypto/heimdal/appl/telnet/telnetd/sys_term.c
189
tcgetattr(ttyfd, &termbuf);
crypto/heimdal/appl/telnet/telnetd/sys_term.c
205
tcsetattr(ttyfd, TCSANOW, &termbuf);
crypto/heimdal/appl/telnet/telnetd/sys_term.c
858
ttyfd = t;
crypto/openssh/monitor.c
1669
if (s->ttyfd != -1) {
crypto/openssh/monitor.c
1692
res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty));
crypto/openssh/monitor.c
1702
if (dup2(s->ttyfd, 0) == -1)
crypto/openssh/monitor.c
1718
mm_send_fd(sock, s->ttyfd) == -1)
crypto/openssh/monitor.c
1728
close(s->ttyfd);
crypto/openssh/monitor.c
1729
s->ttyfd = s->ptyfd;
crypto/openssh/monitor.c
1733
debug3_f("tty %s ptyfd %d", s->tty, s->ttyfd);
crypto/openssh/monitor_wrap.c
610
mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen)
crypto/openssh/monitor_wrap.c
654
(*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1)
crypto/openssh/monitor_wrap.c
667
if (s->ttyfd == -1)
crypto/openssh/monitor_wrap.c
682
s->ttyfd = -1;
crypto/openssh/readpass.c
123
int rppflags, ttyfd, use_askpass = 0, allow_askpass = 0;
crypto/openssh/readpass.c
152
ttyfd = open(_PATH_TTY, O_RDWR);
crypto/openssh/readpass.c
153
if (ttyfd >= 0) {
crypto/openssh/readpass.c
160
(void)write(ttyfd, &cr, 1);
crypto/openssh/readpass.c
161
close(ttyfd);
crypto/openssh/session.c
1156
if (s->ttyfd != -1)
crypto/openssh/session.c
1421
if (s->ttyfd != -1) {
crypto/openssh/session.c
1516
session_setup_sia(pw, s->ttyfd == -1 ? NULL : s->tty);
crypto/openssh/session.c
1708
sessions[id].ttyfd = -1;
crypto/openssh/session.c
1795
if (s->used && s->ttyfd != -1 && strcmp(s->tty, tty) == 0) {
crypto/openssh/session.c
1884
if (s->ttyfd != -1) {
crypto/openssh/session.c
1903
if (!mm_pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty))) {
crypto/openssh/session.c
1907
s->ttyfd = -1;
crypto/openssh/session.c
1913
ssh_tty_parse_modes(ssh, s->ttyfd);
crypto/openssh/session.c
2250
if (s->ttyfd == -1)
crypto/openssh/session.c
2273
s->ttyfd = -1;
crypto/openssh/session.c
2421
if (s->ttyfd != -1)
crypto/openssh/session.c
2451
if (s->ttyfd != -1)
crypto/openssh/session.c
2472
debug_f("channel %d: has child, ttyfd %d", id, s->ttyfd);
crypto/openssh/session.c
2478
if (s->ttyfd != -1)
crypto/openssh/session.c
2523
if (s->used && s->ttyfd != -1) {
crypto/openssh/session.c
535
int fdout, ptyfd, ttyfd, ptymaster;
crypto/openssh/session.c
541
ttyfd = s->ttyfd;
crypto/openssh/session.c
552
close(ttyfd);
crypto/openssh/session.c
559
close(ttyfd);
crypto/openssh/session.c
571
close(ttyfd);
crypto/openssh/session.c
584
pty_make_controlling_tty(&ttyfd, s->tty);
crypto/openssh/session.c
587
if (dup2(ttyfd, 0) == -1)
crypto/openssh/session.c
589
if (dup2(ttyfd, 1) == -1)
crypto/openssh/session.c
591
if (dup2(ttyfd, 2) == -1)
crypto/openssh/session.c
595
close(ttyfd);
crypto/openssh/session.c
618
close(ttyfd);
crypto/openssh/session.c
666
if (s->ttyfd != -1) {
crypto/openssh/session.c
684
else if (s->ttyfd == -1) {
crypto/openssh/session.c
692
if (s->ttyfd != -1)
crypto/openssh/session.h
42
int ptyfd, ttyfd, ptymaster;
crypto/openssh/sshpty.c
123
if (ioctl(*ttyfd, TIOCSCTTY, NULL) < 0)
crypto/openssh/sshpty.c
61
pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen)
crypto/openssh/sshpty.c
67
i = openpty(ptyfd, ttyfd, NULL, NULL, NULL);
crypto/openssh/sshpty.c
72
name = ttyname(*ttyfd);
crypto/openssh/sshpty.c
96
pty_make_controlling_tty(int *ttyfd, const char *tty)
sbin/conscontrol/conscontrol.c
157
int ttyfd;
sbin/conscontrol/conscontrol.c
159
ttyfd = open(devnam, O_RDONLY);
sbin/conscontrol/conscontrol.c
160
if (ttyfd == -1)
sbin/conscontrol/conscontrol.c
162
if (ioctl(ttyfd, TIOCCONS, &flag) == -1)
sbin/conscontrol/conscontrol.c
165
close(ttyfd);
usr.bin/patch/util.c
273
static int ttyfd = -1;
usr.bin/patch/util.c
279
if (ttyfd < 0)
usr.bin/patch/util.c
280
ttyfd = open(_PATH_TTY, O_RDONLY);
usr.bin/patch/util.c
281
if (ttyfd >= 0) {
usr.bin/patch/util.c
282
if ((nr = read(ttyfd, buf, buf_size)) > 0 &&
usr.bin/patch/util.c
286
if (ttyfd < 0 || nr <= 0) {
usr.sbin/bhyve/uart_backend.c
114
ttyread(struct ttyfd *tf, uint8_t *ret)
usr.sbin/bhyve/uart_backend.c
127
ttywrite(struct ttyfd *tf, unsigned char wb)
usr.sbin/bhyve/uart_backend.c
73
struct ttyfd tty;
usr.sbin/bhyve/uart_backend.c
97
ttyopen(struct ttyfd *tf)