Home
last modified time | relevance | path

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

/freebsd-13.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-13.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-13.1/bin/sh/
H A Djobs.c163 if (ttyfd >= 0) { in jobctl_notty()
164 close(ttyfd); in jobctl_notty()
165 ttyfd = -1; in jobctl_notty()
186 if (ttyfd != -1) in setjobctl()
187 close(ttyfd); in setjobctl()
207 close(ttyfd); in setjobctl()
208 ttyfd = i; in setjobctl()
235 close(ttyfd); in setjobctl()
236 ttyfd = -1; in setjobctl()
262 if (ttyfd >= 0) in fgcmd()
[all …]
/freebsd-13.1/crypto/openssh/
H A Dsshpty.c65 pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) in pty_allocate() argument
71 i = openpty(ptyfd, ttyfd, NULL, NULL, NULL); in pty_allocate()
76 name = ttyname(*ttyfd); in pty_allocate()
100 pty_make_controlling_tty(int *ttyfd, const char *tty) in pty_make_controlling_tty() argument
127 if (ioctl(*ttyfd, TIOCSCTTY, NULL) < 0) in pty_make_controlling_tty()
H A Dreadpass.c126 int rppflags, ttyfd, use_askpass = 0, allow_askpass = 0; in read_passphrase() local
154 ttyfd = open(_PATH_TTY, O_RDWR); in read_passphrase()
155 if (ttyfd >= 0) { in read_passphrase()
162 (void)write(ttyfd, &cr, 1); in read_passphrase()
163 close(ttyfd); in read_passphrase()
H A Dsession.c568 ttyfd = s->ttyfd; in do_exec_pty()
579 close(ttyfd); in do_exec_pty()
586 close(ttyfd); in do_exec_pty()
598 close(ttyfd); in do_exec_pty()
622 close(ttyfd); in do_exec_pty()
645 close(ttyfd); in do_exec_pty()
721 if (s->ttyfd != -1) in do_exec()
1206 if (s->ttyfd != -1) in do_setup_env()
1958 s->ttyfd = -1; in session_pty_req()
2294 if (s->ttyfd == -1) in session_pty_cleanup2()
[all …]
H A Dsession.h42 int ptyfd, ttyfd, ptymaster; member
H A Dmonitor.c1524 if (s->ttyfd != -1) { in mm_session_close()
1547 res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty)); in mm_answer_pty()
1557 if (dup2(s->ttyfd, 0) == -1) in mm_answer_pty()
1573 mm_send_fd(sock, s->ttyfd) == -1) in mm_answer_pty()
1583 close(s->ttyfd); in mm_answer_pty()
1584 s->ttyfd = s->ptyfd; in mm_answer_pty()
1588 debug3_f("tty %s ptyfd %d", s->tty, s->ttyfd); in mm_answer_pty()
H A Dmonitor_wrap.c567 mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) in mm_pty_allocate() argument
613 (*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1) in mm_pty_allocate()
626 if (s->ttyfd == -1) in mm_session_pty_cleanup2()
641 s->ttyfd = -1; in mm_session_pty_cleanup2()
H A Dconfigure.ac2389 int fd, ptyfd, ttyfd, status;
2403 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
/freebsd-13.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-13.1/usr.sbin/bhyve/
H A Duart_emul.c110 struct ttyfd { struct
133 struct ttyfd tty; argument
151 ttyopen(struct ttyfd *tf) in ttyopen()
168 ttyread(struct ttyfd *tf) in ttyread()
179 ttywrite(struct ttyfd *tf, unsigned char wb) in ttywrite()
/freebsd-13.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-13.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()