| /src/bin/pax/ |
| tty_subs.c | 81 int ttyfd; local 83 if ((ttyfd = open(DEVTTY, O_RDWR)) >= 0) { 84 if ((ttyoutf = fdopen(ttyfd, "w")) != NULL) { 85 if ((ttyinf = fdopen(ttyfd, "r")) != NULL) 89 (void)close(ttyfd);
|
| /src/usr.bin/find/ |
| misc.c | 140 static int ttyfd = -2; local 153 if (ttyfd == -2) 154 ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC); 156 if (ttyfd == -1) 165 write(ttyfd, buf, (size_t)n);
|
| /src/external/bsd/tmux/dist/ |
| osdep-sunos.c | 74 int retval, ttyfd; local 78 if ((ttyfd = open(ttypath, O_RDONLY|O_NOCTTY)) == -1) 81 retval = ioctl(ttyfd, TIOCGPGRP, &pgrp); 82 close(ttyfd);
|
| /src/usr.bin/write/ |
| write.c | 79 int msgsok, ttyfd; local 86 ttyfd = -1; 93 ttyfd = search_utmp(argv[1], mytty, myuid, saved_egid); 103 ttyfd = term_chk(uid, argv[2], &msgsok, &atime, 0, saved_egid); 104 if (ttyfd == -1) 116 do_write(ttyfd, mytty, myuid); 216 do_write(int ttyfd, const char *mytty, const uid_t myuid) 231 if (dup2(ttyfd, STDOUT_FILENO) == -1) 236 (void)close(ttyfd);
|
| /src/external/bsd/ntp/dist/ntpd/ |
| ntp_ppsdev.c | 386 int ttyfd , /* current tty FD, or -1 */ 416 if ((-1 == retfd) && (-1 != ttyfd)) { 417 char *xpath = findMatchingPpsDev(ttyfd); 436 retfd = ttyfd; 441 if ((retfd != ttyfd) && (retfd != ppsfd)) 442 ppsdev_close(ttyfd, ppsfd); 449 int ttyfd, /* current tty FD, or -1 */ 455 if ((-1 != ppsfd) && (ttyfd != ppsfd))
|
| refclock_oncore.c | 275 int ttyfd; /* TTY file descriptor */ member in struct:instance 723 instance->ttyfd = fd1; 795 close(instance->ttyfd); 797 if ((instance->ppsfd != -1) && (instance->ppsfd != instance->ttyfd)) 3545 refclock_fdwrite(instance->peer, instance->ttyfd, 3561 write(instance->ttyfd, cp, n); 3771 fd = instance->ttyfd;
|
| /src/external/bsd/ekermit/dist/ |
| unixio.c | 66 static int ttyfd, ofile = -1; /* File descriptors */ variable 131 ttyfd = 0; 144 if (ttyfd < 0) /* Device must be open */ 180 ttyfd = -1; 198 if (ttyfd < 0) /* Device must be open */ 203 if (ttyfd < 0) 208 if (ttyfd < 0) 213 if (ttyfd < 0) 260 if (ttyfd < 0 || !p) { /* Device not open or no buffer */ 328 x = write(ttyfd,p,n) [all...] |
| /src/crypto/external/bsd/openssh/dist/ |
| sshpty.c | 51 pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) 56 i = openpty(ptyfd, ttyfd, buf, NULL, NULL); 79 pty_make_controlling_tty(int *ttyfd, const char *tty) 106 if (ioctl(*ttyfd, TIOCSCTTY, NULL) == -1)
|
| readpass.c | 126 int rppflags, ttyfd, use_askpass = 0, allow_askpass = 0; local 155 ttyfd = open(_PATH_TTY, O_RDWR); 156 if (ttyfd >= 0) { 163 (void)write(ttyfd, &cr, 1); 164 close(ttyfd);
|
| session.h | 45 int ptyfd, ttyfd, ptymaster; member in struct:Session
|
| session.c | 510 int fdout, ptyfd, ttyfd, ptymaster; local 516 ttyfd = s->ttyfd; 527 close(ttyfd); 534 close(ttyfd); 546 close(ttyfd); 559 pty_make_controlling_tty(&ttyfd, s->tty); 562 if (dup2(ttyfd, 0) == -1) 564 if (dup2(ttyfd, 1) == -1) 566 if (dup2(ttyfd, 2) == -1 [all...] |
| monitor.c | 1722 if (s->ttyfd != -1) { 1745 res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty)); 1755 if (dup2(s->ttyfd, 0) == -1) 1771 mm_send_fd(sock, s->ttyfd) == -1) 1781 close(s->ttyfd); 1782 s->ttyfd = s->ptyfd; 1786 debug3_f("tty %s ptyfd %d", s->tty, s->ttyfd);
|
| monitor_wrap.c | 645 mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) 690 (*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1) 703 if (s->ttyfd == -1) 718 s->ttyfd = -1;
|
| /src/external/bsd/ppp/dist/pppd/ |
| tty.c | 130 static int ttyfd; /* Serial port file descriptor */ variable 639 ttyfd = real_ttyfd; 640 if ((fdflags = fcntl(ttyfd, F_GETFL)) == -1 641 || fcntl(ttyfd, F_SETFL, fdflags & ~O_NONBLOCK) < 0) 652 if (fstat(ttyfd, &statbuf) < 0 653 || fchmod(ttyfd, statbuf.st_mode & ~(S_IWGRP | S_IWOTH)) < 0) { 669 set_up_tty(ttyfd, ((connector != NULL && connector[0] != 0) 718 int fd = dup(ttyfd); 724 ttyfd = pty_slave; 741 if (device_script(initializer, ttyfd, ttyfd, 0) < 0) [all...] |
| /src/usr.bin/patch/ |
| util.c | 263 static int ttyfd = -1; local 269 if (ttyfd < 0) 270 ttyfd = open(_PATH_TTY, O_RDONLY); 271 if (ttyfd >= 0) { 272 if ((nr = read(ttyfd, buf, bufsz)) > 0 && 276 if (ttyfd < 0 || nr <= 0) {
|
| /src/bin/sh/ |
| jobs.c | 103 static int ttyfd = -1; variable 149 if (ttyfd == from) 150 ttyfd = to; 176 if (ttyfd != -1) 177 sh_close(ttyfd); 178 if ((ttyfd = open("/dev/tty", O_RDWR)) == -1) { 180 if (isatty(i) && (ttyfd = dup(i)) != -1) 186 ttyfd = to_upper_fd(ttyfd); /* Move to a high fd */ 187 register_sh_fd(ttyfd, ttyfd_change) [all...] |
| /src/external/bsd/ntp/dist/include/ |
| ntp_refclock.h | 265 int ttyfd, int ppsfd, const char *ppspath, 267 extern void ppsdev_close(int ttyfd, int ppsfd);
|
| /src/sbin/scan_ffs/ |
| scan_ffs.c | 409 static int ttyfd = -2; local 415 if (ttyfd == -2) 416 ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC); 418 if (ttyfd == -1) 426 write(ttyfd, buf, (size_t)n);
|
| /src/bin/rcp/ |
| rcp.c | 828 static int ttyfd = -2; local 833 if (ttyfd == -2) 834 ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC); 836 if (ttyfd == -1) 846 write(ttyfd, buf, (size_t)n);
|
| /src/external/gpl2/xcvs/dist/src/ |
| main.c | 510 static int ttyfd = -2; local 512 if (ttyfd == -2) 513 ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC); 515 if (ttyfd == -1) 524 write(ttyfd, buf, (size_t)n);
|
| /src/usr.bin/gzip/ |
| gzip.c | 1732 static int ttyfd = -2; local 1742 if (ttyfd == -2) 1743 ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC); 1745 if (ttyfd == -1) 1763 write(ttyfd, buf, (size_t)n);
|
| /src/external/bsd/ppp/usr.sbin/pppd/ |
| sys-bsd.c | 202 static int ttyfd = -1; /* the file descriptor of the tty */ variable 406 ttyfd = fd; 1056 if (write(ttyfd, p, len) < 0) { 1148 if ((len = read(ttyfd, buf, PPP_MTU + PPP_HDRLEN)) < 0) { 1285 if (ioctl(ttyfd, PPPIOCSCOMPRESS, (caddr_t) &data) >= 0)
|