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
1661
if (s->ttyfd != -1) {
crypto/openssh/monitor.c
1684
res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty));
crypto/openssh/monitor.c
1694
if (dup2(s->ttyfd, 0) == -1)
crypto/openssh/monitor.c
1710
mm_send_fd(sock, s->ttyfd) == -1)
crypto/openssh/monitor.c
1720
close(s->ttyfd);
crypto/openssh/monitor.c
1721
s->ttyfd = s->ptyfd;
crypto/openssh/monitor.c
1725
debug3_f("tty %s ptyfd %d", s->tty, s->ttyfd);
crypto/openssh/monitor_wrap.c
614
mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen)
crypto/openssh/monitor_wrap.c
658
(*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1)
crypto/openssh/monitor_wrap.c
671
if (s->ttyfd == -1)
crypto/openssh/monitor_wrap.c
686
s->ttyfd = -1;
crypto/openssh/readpass.c
126
int rppflags, ttyfd, use_askpass = 0, allow_askpass = 0;
crypto/openssh/readpass.c
155
ttyfd = open(_PATH_TTY, O_RDWR);
crypto/openssh/readpass.c
156
if (ttyfd >= 0) {
crypto/openssh/readpass.c
163
(void)write(ttyfd, &cr, 1);
crypto/openssh/readpass.c
164
close(ttyfd);
crypto/openssh/session.c
1187
if (s->ttyfd != -1)
crypto/openssh/session.c
1452
if (s->ttyfd != -1) {
crypto/openssh/session.c
1547
session_setup_sia(pw, s->ttyfd == -1 ? NULL : s->tty);
crypto/openssh/session.c
1738
sessions[id].ttyfd = -1;
crypto/openssh/session.c
1825
if (s->used && s->ttyfd != -1 && strcmp(s->tty, tty) == 0) {
crypto/openssh/session.c
1914
if (s->ttyfd != -1) {
crypto/openssh/session.c
1933
if (!mm_pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty))) {
crypto/openssh/session.c
1937
s->ttyfd = -1;
crypto/openssh/session.c
1943
ssh_tty_parse_modes(ssh, s->ttyfd);
crypto/openssh/session.c
2276
if (s->ttyfd == -1)
crypto/openssh/session.c
2299
s->ttyfd = -1;
crypto/openssh/session.c
2447
if (s->ttyfd != -1)
crypto/openssh/session.c
2477
if (s->ttyfd != -1)
crypto/openssh/session.c
2498
debug_f("channel %d: has child, ttyfd %d", id, s->ttyfd);
crypto/openssh/session.c
2504
if (s->ttyfd != -1)
crypto/openssh/session.c
2549
if (s->used && s->ttyfd != -1) {
crypto/openssh/session.c
570
int fdout, ptyfd, ttyfd, ptymaster;
crypto/openssh/session.c
576
ttyfd = s->ttyfd;
crypto/openssh/session.c
587
close(ttyfd);
crypto/openssh/session.c
594
close(ttyfd);
crypto/openssh/session.c
606
close(ttyfd);
crypto/openssh/session.c
619
pty_make_controlling_tty(&ttyfd, s->tty);
crypto/openssh/session.c
622
if (dup2(ttyfd, 0) == -1)
crypto/openssh/session.c
624
if (dup2(ttyfd, 1) == -1)
crypto/openssh/session.c
626
if (dup2(ttyfd, 2) == -1)
crypto/openssh/session.c
630
close(ttyfd);
crypto/openssh/session.c
653
close(ttyfd);
crypto/openssh/session.c
703
if (s->ttyfd != -1) {
crypto/openssh/session.c
721
else if (s->ttyfd == -1) {
crypto/openssh/session.c
729
if (s->ttyfd != -1)
crypto/openssh/session.h
42
int ptyfd, ttyfd, ptymaster;
crypto/openssh/sshpty.c
100
pty_make_controlling_tty(int *ttyfd, const char *tty)
crypto/openssh/sshpty.c
127
if (ioctl(*ttyfd, TIOCSCTTY, NULL) < 0)
crypto/openssh/sshpty.c
65
pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen)
crypto/openssh/sshpty.c
71
i = openpty(ptyfd, ttyfd, NULL, NULL, NULL);
crypto/openssh/sshpty.c
76
name = ttyname(*ttyfd);
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)