Home
last modified time | relevance | path

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

/freebsd-14.2/bin/pax/
H A 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-14.2/contrib/ntp/ntpd/
H A Dntp_ppsdev.c384 int ttyfd , /* current tty FD, or -1 */ in ppsdev_reopen() argument
414 if ((-1 == retfd) && (-1 != ttyfd)) { in ppsdev_reopen()
415 char *xpath = findMatchingPpsDev(ttyfd); in ppsdev_reopen()
434 retfd = ttyfd; in ppsdev_reopen()
439 if ((retfd != ttyfd) && (retfd != ppsfd)) in ppsdev_reopen()
440 ppsdev_close(ttyfd, ppsfd); in ppsdev_reopen()
447 int ttyfd, /* current tty FD, or -1 */ in ppsdev_close() argument
453 if ((-1 != ppsfd) && (ttyfd != ppsfd)) in ppsdev_close()
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()
3542 refclock_fdwrite(instance->peer, instance->ttyfd, in oncore_load_almanac()
3558 write(instance->ttyfd, cp, n); in oncore_load_almanac()
3768 fd = instance->ttyfd; in oncore_sendmsg()
/freebsd-14.2/tools/test/stress2/misc/
H A Drevoke.sh71 int ttyfd;
98 ttyfd = open(argv[1], O_RDWR);
99 if (ttyfd < 0) {
103 if (ioctl(ttyfd, TIOCSCTTY) < 0) {
/freebsd-14.2/sbin/conscontrol/
H A 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-14.2/bin/sh/
H A Djobs.c161 if (ttyfd >= 0) { in jobctl_notty()
162 close(ttyfd); in jobctl_notty()
163 ttyfd = -1; in jobctl_notty()
184 if (ttyfd != -1) in setjobctl()
185 close(ttyfd); in setjobctl()
205 close(ttyfd); in setjobctl()
206 ttyfd = i; in setjobctl()
233 close(ttyfd); in setjobctl()
234 ttyfd = -1; in setjobctl()
260 if (ttyfd >= 0) in fgcmd()
[all …]
/freebsd-14.2/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.c565 ttyfd = s->ttyfd; in do_exec_pty()
576 close(ttyfd); in do_exec_pty()
583 close(ttyfd); in do_exec_pty()
595 close(ttyfd); in do_exec_pty()
619 close(ttyfd); in do_exec_pty()
642 close(ttyfd); in do_exec_pty()
718 if (s->ttyfd != -1) in do_exec()
1198 if (s->ttyfd != -1) in do_setup_env()
1950 s->ttyfd = -1; in session_pty_req()
2295 if (s->ttyfd == -1) in session_pty_cleanup2()
[all …]
H A Dsession.h42 int ptyfd, ttyfd, ptymaster; member
H A Dmonitor.c1539 if (s->ttyfd != -1) { in mm_session_close()
1562 res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty)); in mm_answer_pty()
1572 if (dup2(s->ttyfd, 0) == -1) in mm_answer_pty()
1588 mm_send_fd(sock, s->ttyfd) == -1) in mm_answer_pty()
1598 close(s->ttyfd); in mm_answer_pty()
1599 s->ttyfd = s->ptyfd; in mm_answer_pty()
1603 debug3_f("tty %s ptyfd %d", s->tty, s->ttyfd); in mm_answer_pty()
H A Dmonitor_wrap.c568 mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) in mm_pty_allocate() argument
612 (*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1) in mm_pty_allocate()
625 if (s->ttyfd == -1) in mm_session_pty_cleanup2()
640 s->ttyfd = -1; in mm_session_pty_cleanup2()
H A Dconfigure.ac2495 int fd, ptyfd, ttyfd, status;
2509 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
/freebsd-14.2/usr.bin/patch/
H A Dutil.c273 static int ttyfd = -1; in ask() local
279 if (ttyfd < 0) in ask()
280 ttyfd = open(_PATH_TTY, O_RDONLY); in ask()
281 if (ttyfd >= 0) { in ask()
282 if ((nr = read(ttyfd, buf, buf_size)) > 0 && in ask()
286 if (ttyfd < 0 || nr <= 0) { in ask()
/freebsd-14.2/usr.sbin/bhyve/
H A Duart_backend.c49 struct ttyfd { struct
66 struct ttyfd tty; argument
81 ttyopen(struct ttyfd *tf) in ttyopen()
98 ttyread(struct ttyfd *tf) in ttyread()
109 ttywrite(struct ttyfd *tf, unsigned char wb) in ttywrite()
/freebsd-14.2/contrib/ntp/include/
H A Dntp_refclock.h260 int ttyfd, int ppsfd, const char *ppspath,
262 extern void ppsdev_close(int ttyfd, int ppsfd);
/freebsd-14.2/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()