| /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/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/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/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/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);
|