Home
last modified time | relevance | path

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

/freebsd-12.1/bin/pax/
H A Dtty_subs.c71 int ttyfd; in tty_init() local
73 if ((ttyfd = open(DEVTTY, O_RDWR)) >= 0) { in tty_init()
74 if ((ttyoutf = fdopen(ttyfd, "w")) != NULL) { in tty_init()
75 if ((ttyinf = fdopen(ttyfd, "r")) != NULL) in tty_init()
79 (void)close(ttyfd); in tty_init()
/freebsd-12.1/sbin/conscontrol/
H A Dconscontrol.c160 int ttyfd; in consset() local
162 ttyfd = open(devnam, O_RDONLY); in consset()
163 if (ttyfd == -1) in consset()
165 if (ioctl(ttyfd, TIOCCONS, &flag) == -1) in consset()
168 close(ttyfd); in consset()
/freebsd-12.1/bin/sh/
H A Djobs.c162 if (ttyfd >= 0) { in jobctl_notty()
163 close(ttyfd); in jobctl_notty()
164 ttyfd = -1; in jobctl_notty()
185 if (ttyfd != -1) in setjobctl()
186 close(ttyfd); in setjobctl()
206 close(ttyfd); in setjobctl()
207 ttyfd = i; in setjobctl()
234 close(ttyfd); in setjobctl()
235 ttyfd = -1; in setjobctl()
261 if (ttyfd >= 0) in fgcmd()
[all …]
/freebsd-12.1/crypto/openssh/
H A 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()
H A Dreadpass.c121 int rppflags, use_askpass = 0, ttyfd; in read_passphrase() local
133 ttyfd = open(_PATH_TTY, O_RDWR); in read_passphrase()
134 if (ttyfd >= 0) in read_passphrase()
135 close(ttyfd); in read_passphrase()
H A Dsession.c573 ttyfd = s->ttyfd; in do_exec_pty()
584 close(ttyfd); in do_exec_pty()
591 close(ttyfd); in do_exec_pty()
603 close(ttyfd); in do_exec_pty()
627 close(ttyfd); in do_exec_pty()
650 close(ttyfd); in do_exec_pty()
753 if (s->ttyfd != -1) in do_exec()
1225 if (s->ttyfd != -1) in do_setup_env()
1966 s->ttyfd = -1; in session_pty_req()
2211 if (s->ttyfd == -1) in session_pty_cleanup2()
[all …]
H A Dsession.h41 int ptyfd, ttyfd, ptymaster; member
H A Dmonitor.c1498 if (s->ttyfd != -1) { in mm_session_close()
1521 res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty)); in mm_answer_pty()
1531 if (dup2(s->ttyfd, 0) == -1) in mm_answer_pty()
1547 mm_send_fd(sock, s->ttyfd) == -1) in mm_answer_pty()
1557 close(s->ttyfd); in mm_answer_pty()
1558 s->ttyfd = s->ptyfd; in mm_answer_pty()
1562 debug3("%s: tty %s ptyfd %d", __func__, s->tty, s->ttyfd); in mm_answer_pty()
H A Dmonitor_wrap.c591 mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) in mm_pty_allocate() argument
637 (*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1) in mm_pty_allocate()
650 if (s->ttyfd == -1) in mm_session_pty_cleanup2()
665 s->ttyfd = -1; in mm_session_pty_cleanup2()
H A Dconfigure.ac2275 int fd, ptyfd, ttyfd, status;
2289 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
/freebsd-12.1/usr.bin/patch/
H A 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-12.1/usr.sbin/bhyve/
H A Duart_emul.c101 struct ttyfd { struct
124 struct ttyfd tty; argument
142 ttyopen(struct ttyfd *tf) in ttyopen()
158 ttyread(struct ttyfd *tf) in ttyread()
169 ttywrite(struct ttyfd *tf, unsigned char wb) in ttywrite()
/freebsd-12.1/crypto/heimdal/appl/telnet/telnetd/
H A 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-12.1/contrib/ntp/ntpd/
H A Drefclock_oncore.c273 int ttyfd; /* TTY file descriptor */ member
721 instance->ttyfd = fd1; in oncore_start()
793 close(instance->ttyfd); in oncore_shutdown()
795 if ((instance->ppsfd != -1) && (instance->ppsfd != instance->ttyfd)) in oncore_shutdown()
3540 write(instance->ttyfd, cp, n); in oncore_load_almanac()
3555 write(instance->ttyfd, cp, n); in oncore_load_almanac()
3764 fd = instance->ttyfd; in oncore_sendmsg()