/openbsd-current/bin/pax/ |
H A D | tty_subs.c | 65 int ttyfd; local 67 if ((ttyfd = open(DEVTTY, O_RDWR | O_CLOEXEC)) >= 0) { 68 if ((ttyoutf = fdopen(ttyfd, "w")) != NULL) { 69 if ((ttyinf = fdopen(ttyfd, "r")) != NULL) 73 (void)close(ttyfd);
|
/openbsd-current/usr.sbin/pppd/ |
H A D | main.c | 100 int ttyfd = -1; /* Serial port file descriptor */ variable 442 while ((ttyfd = open(devnam, O_NONBLOCK | O_RDWR)) < 0) { 448 if ((fdflags = fcntl(ttyfd, F_GETFL)) == -1 449 || fcntl(ttyfd, F_SETFL, fdflags & ~O_NONBLOCK) < 0) 459 if (fstat(ttyfd, &statbuf) < 0 460 || fchmod(ttyfd, statbuf.st_mode & ~(S_IWGRP | S_IWOTH)) < 0) { 479 set_up_tty(ttyfd, (modem_chat == 0)); 483 setdtr(ttyfd, FALSE); 485 setdtr(ttyfd, TRUE); 488 if (device_script(connector, ttyfd, ttyf [all...] |
H A D | sys-bsd.c | 583 if (write(ttyfd, p, len) == -1) { 591 * wait_input - wait until there is data available on ttyfd, 603 fdsn = howmany(ttyfd+1, NFDBITS) * sizeof(fd_mask); 607 FD_SET(ttyfd, fdsp); 609 n = select(ttyfd+1, fdsp, NULL, fdsp, timo); 675 if ((len = read(ttyfd, buf, PPP_MTU + PPP_HDRLEN)) == -1) { 811 if (ioctl(ttyfd, PPPIOCSCOMPRESS, (caddr_t) &data) >= 0)
|
H A D | pppd.h | 75 extern int ttyfd; /* Serial device file descriptor */
|
/openbsd-current/usr.bin/ssh/ |
H A D | sshpty.c | 45 pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) argument 50 i = openpty(ptyfd, ttyfd, buf, NULL, NULL); 73 pty_make_controlling_tty(int *ttyfd, const char *tty) argument 100 if (ioctl(*ttyfd, TIOCSCTTY, NULL) == -1)
|
H A D | session.h | 42 int ptyfd, ttyfd, ptymaster; member in struct:Session
|
H A D | readpass.c | 123 int rppflags, ttyfd, use_askpass = 0, allow_askpass = 0; local 152 ttyfd = open(_PATH_TTY, O_RDWR); 153 if (ttyfd >= 0) { 160 (void)write(ttyfd, &cr, 1); 161 close(ttyfd);
|
H A D | session.c | 535 int fdout, ptyfd, ttyfd, ptymaster; local 541 ttyfd = s->ttyfd; 552 close(ttyfd); 559 close(ttyfd); 571 close(ttyfd); 584 pty_make_controlling_tty(&ttyfd, s->tty); 587 if (dup2(ttyfd, 0) == -1) 589 if (dup2(ttyfd, 1) == -1) 591 if (dup2(ttyfd, [all...] |
H A D | monitor_wrap.c | 601 mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) argument 645 (*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1) 658 if (s->ttyfd == -1) 673 s->ttyfd = -1;
|
H A D | monitor.c | 1301 if (s->ttyfd != -1) { 1324 res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty)); 1334 if (dup2(s->ttyfd, 0) == -1) 1350 mm_send_fd(sock, s->ttyfd) == -1) 1360 close(s->ttyfd); 1361 s->ttyfd = s->ptyfd; 1365 debug3_f("tty %s ptyfd %d", s->tty, s->ttyfd);
|
/openbsd-current/usr.bin/patch/ |
H A D | util.c | 261 static int ttyfd = -1; local 267 if (ttyfd < 0) 268 ttyfd = open(_PATH_TTY, O_RDONLY); 269 if (ttyfd >= 0) { 270 if ((nr = read(ttyfd, buf, bufsz)) > 0 && 274 if (ttyfd == -1 || nr <= 0) {
|