/freebsd/bin/pax/ |
H A D | tty_subs.c | 63 int ttyfd; in tty_init() local 65 if ((ttyfd = open(DEVTTY, O_RDWR)) >= 0) { in tty_init() 66 if ((ttyoutf = fdopen(ttyfd, "w")) != NULL) { in tty_init() 67 if ((ttyinf = fdopen(ttyfd, "r")) != NULL) in tty_init() 71 (void)close(ttyfd); in tty_init()
|
/freebsd/contrib/ntp/ntpd/ |
H A D | ntp_ppsdev.c | 384 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 D | refclock_oncore.c | 273 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/tools/test/stress2/misc/ |
H A D | revoke.sh | 71 int ttyfd; 98 ttyfd = open(argv[1], O_RDWR); 99 if (ttyfd < 0) { 103 if (ioctl(ttyfd, TIOCSCTTY) < 0) {
|
/freebsd/sbin/conscontrol/ |
H A D | conscontrol.c | 157 int ttyfd; in consset() local 159 ttyfd = open(devnam, O_RDONLY); in consset() 160 if (ttyfd == -1) in consset() 162 if (ioctl(ttyfd, TIOCCONS, &flag) == -1) in consset() 165 close(ttyfd); in consset()
|
/freebsd/bin/sh/ |
H A D | jobs.c | 116 static int ttyfd = -1; variable 155 if (ttyfd >= 0) { in jobctl_notty() 156 close(ttyfd); in jobctl_notty() 157 ttyfd = -1; in jobctl_notty() 178 if (ttyfd != -1) in setjobctl() 179 close(ttyfd); in setjobctl() 180 if ((ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC)) < 0) { in setjobctl() 185 (ttyfd = fcntl(i, F_DUPFD_CLOEXEC, 10)) < 0) { in setjobctl() 190 if (ttyfd < 10) { in setjobctl() 195 if ((i = fcntl(ttyfd, F_DUPFD_CLOEXEC, 10)) < 0) { in setjobctl() [all …]
|
/freebsd/crypto/openssh/ |
H A D | sshpty.c | 65 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 D | session.c | 570 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 …]
|
H A D | readpass.c | 126 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()
|
H A D | session.h | 42 int ptyfd, ttyfd, ptymaster; member
|
H A D | monitor.c | 1564 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()
|
H A D | monitor_wrap.c | 624 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()
|
H A D | configure.ac | 2500 int fd, ptyfd, ttyfd, status; 2514 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
|
/freebsd/usr.bin/patch/ |
H A D | util.c | 273 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/usr.sbin/bhyve/ |
H A D | uart_backend.c | 55 struct ttyfd { struct 73 struct ttyfd tty; argument 97 ttyopen(struct ttyfd *tf) in ttyopen() 114 ttyread(struct ttyfd *tf, uint8_t *ret) in ttyread() 127 ttywrite(struct ttyfd *tf, unsigned char wb) in ttywrite()
|
/freebsd/contrib/ntp/include/ |
H A D | ntp_refclock.h | 260 int ttyfd, int ppsfd, const char *ppspath, 262 extern void ppsdev_close(int ttyfd, int ppsfd);
|
/freebsd/crypto/heimdal/appl/telnet/telnetd/ |
H A D | sys_term.c | 165 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()
|