Home
last modified time | relevance | path

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

/freebsd-14-stable/contrib/ntp/ntpd/
HDntp_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()
HDrefclock_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-stable/tools/test/stress2/misc/
HDrevoke.sh71 int ttyfd;
98 ttyfd = open(argv[1], O_RDWR);
99 if (ttyfd < 0) {
103 if (ioctl(ttyfd, TIOCSCTTY) < 0) {
/freebsd-14-stable/sbin/conscontrol/
HDconscontrol.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-stable/crypto/openssh/
HDsshpty.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()
HDsession.c570 int fdout, ptyfd, ttyfd, ptymaster; in do_exec_pty() local
576 ttyfd = s->ttyfd; in do_exec_pty()
587 close(ttyfd); in do_exec_pty()
594 close(ttyfd); in do_exec_pty()
606 close(ttyfd); in do_exec_pty()
619 pty_make_controlling_tty(&ttyfd, s->tty); in do_exec_pty()
622 if (dup2(ttyfd, 0) == -1) in do_exec_pty()
624 if (dup2(ttyfd, 1) == -1) in do_exec_pty()
626 if (dup2(ttyfd, 2) == -1) in do_exec_pty()
630 close(ttyfd); in do_exec_pty()
[all …]
HDreadpass.c126 int rppflags, ttyfd, use_askpass = 0, allow_askpass = 0; in read_passphrase() local
155 ttyfd = open(_PATH_TTY, O_RDWR); in read_passphrase()
156 if (ttyfd >= 0) { in read_passphrase()
163 (void)write(ttyfd, &cr, 1); in read_passphrase()
164 close(ttyfd); in read_passphrase()
HDsession.h42 int ptyfd, ttyfd, ptymaster; member
HDmonitor.c1564 if (s->ttyfd != -1) { in mm_session_close()
1587 res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty)); in mm_answer_pty()
1597 if (dup2(s->ttyfd, 0) == -1) in mm_answer_pty()
1613 mm_send_fd(sock, s->ttyfd) == -1) in mm_answer_pty()
1623 close(s->ttyfd); in mm_answer_pty()
1624 s->ttyfd = s->ptyfd; in mm_answer_pty()
1628 debug3_f("tty %s ptyfd %d", s->tty, s->ttyfd); in mm_answer_pty()
HDmonitor_wrap.c624 mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) in mm_pty_allocate() argument
668 (*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1) in mm_pty_allocate()
681 if (s->ttyfd == -1) in mm_session_pty_cleanup2()
696 s->ttyfd = -1; in mm_session_pty_cleanup2()
HDconfigure.ac2500 int fd, ptyfd, ttyfd, status;
2514 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
/freebsd-14-stable/usr.bin/patch/
HDutil.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-stable/usr.sbin/bhyve/
HDuart_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-stable/contrib/ntp/include/
HDntp_refclock.h260 int ttyfd, int ppsfd, const char *ppspath,
262 extern void ppsdev_close(int ttyfd, int ppsfd);
/freebsd-14-stable/crypto/heimdal/appl/telnet/telnetd/
HDsys_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()