| /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/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/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/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/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/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/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/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/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)
|
| /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/ntp/dist/ntpd/ |
| 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;
|