Home
last modified time | relevance | path

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

/freebsd-9-stable/crypto/openssh/
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
122 ioctl(*ttyfd, TCSETCTTY, NULL); in pty_make_controlling_tty()
126 close(*ttyfd); in pty_make_controlling_tty()
127 *ttyfd = fd; in pty_make_controlling_tty()
153 if (ioctl(*ttyfd, TIOCSCTTY, NULL) < 0) in pty_make_controlling_tty()
170 close(*ttyfd); in pty_make_controlling_tty()
171 *ttyfd = fd; in pty_make_controlling_tty()
Dreadpass.c122 int rppflags, use_askpass = 0, ttyfd; in read_passphrase() local
134 ttyfd = open(_PATH_TTY, O_RDWR); in read_passphrase()
135 if (ttyfd >= 0) in read_passphrase()
136 close(ttyfd); in read_passphrase()
Dsession.c675 int fdout, ptyfd, ttyfd, ptymaster; in do_exec_pty() local
681 ttyfd = s->ttyfd; in do_exec_pty()
692 close(ttyfd); in do_exec_pty()
699 close(ttyfd); in do_exec_pty()
711 close(ttyfd); in do_exec_pty()
727 pty_make_controlling_tty(&ttyfd, s->tty); in do_exec_pty()
730 if (dup2(ttyfd, 0) < 0) in do_exec_pty()
732 if (dup2(ttyfd, 1) < 0) in do_exec_pty()
734 if (dup2(ttyfd, 2) < 0) in do_exec_pty()
738 close(ttyfd); in do_exec_pty()
[all …]
Dsession.h41 int ptyfd, ttyfd, ptymaster; member
Dmonitor.c1424 if (s->ttyfd != -1) { in mm_session_close()
1447 res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty)); in mm_answer_pty()
1456 if (dup2(s->ttyfd, 0) == -1) in mm_answer_pty()
1471 mm_send_fd(sock, s->ttyfd) == -1) in mm_answer_pty()
1481 close(s->ttyfd); in mm_answer_pty()
1482 s->ttyfd = s->ptyfd; in mm_answer_pty()
1486 debug3("%s: tty %s ptyfd %d", __func__, s->tty, s->ttyfd); in mm_answer_pty()
Dmonitor_wrap.c701 mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) in mm_pty_allocate() argument
743 (*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1) in mm_pty_allocate()
755 if (s->ttyfd == -1) in mm_session_pty_cleanup2()
768 s->ttyfd = -1; in mm_session_pty_cleanup2()
Dconfigure.ac2052 int fd, ptyfd, ttyfd, status;
2066 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
Dconfigure11472 int fd, ptyfd, ttyfd, status;
11486 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
/freebsd-9-stable/bin/pax/
Dtty_subs.c70 int ttyfd; in tty_init() local
72 if ((ttyfd = open(DEVTTY, O_RDWR)) >= 0) { in tty_init()
73 if ((ttyoutf = fdopen(ttyfd, "w")) != NULL) { in tty_init()
74 if ((ttyinf = fdopen(ttyfd, "r")) != NULL) in tty_init()
78 (void)close(ttyfd); in tty_init()
/freebsd-9-stable/sbin/conscontrol/
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-9-stable/bin/sh/
Djobs.c89 static int ttyfd = -1; variable
125 if (ttyfd != -1) in setjobctl()
126 close(ttyfd); in setjobctl()
127 if ((ttyfd = open(_PATH_TTY, O_RDWR)) < 0) { in setjobctl()
131 if (i > 2 || (ttyfd = fcntl(i, F_DUPFD, 10)) < 0) in setjobctl()
134 if (ttyfd < 10) { in setjobctl()
139 if ((i = fcntl(ttyfd, F_DUPFD, 10)) < 0) { in setjobctl()
140 close(ttyfd); in setjobctl()
141 ttyfd = -1; in setjobctl()
144 close(ttyfd); in setjobctl()
[all …]
/freebsd-9-stable/gnu/usr.bin/patch/
Dutil.c251 int ttyfd; local
264 } else if ((ttyfd = open(_PATH_TTY, 2)) >= 0 && isatty(ttyfd)) {
266 write(ttyfd, buf, strlen(buf));
267 r = read(ttyfd, buf, buf_size);
268 Close(ttyfd);
/freebsd-9-stable/crypto/heimdal/appl/telnet/telnetd/
Dsys_term.c160 static int ttyfd = -1; variable
182 tcgetattr(ttyfd, &termbuf); in init_termbuf()
198 tcsetattr(ttyfd, TCSANOW, &termbuf); in set_termbuf()
851 ttyfd = t; in getptyslave()
/freebsd-9-stable/contrib/ntp/ntpd/
Drefclock_oncore.c272 int ttyfd; /* TTY file descriptor */ member
719 instance->ttyfd = fd1; in oncore_start()
791 close(instance->ttyfd); in oncore_shutdown()
793 if ((instance->ppsfd != -1) && (instance->ppsfd != instance->ttyfd)) in oncore_shutdown()
3534 write(instance->ttyfd, cp, n); in oncore_load_almanac()
3549 write(instance->ttyfd, cp, n); in oncore_load_almanac()
3758 fd = instance->ttyfd; in oncore_sendmsg()