HomeSort by: relevance | last modified time | path
    Searched defs:ttyfd (Results 1 - 8 of 8) sorted by relevancy

  /src/bin/pax/
tty_subs.c 81 int ttyfd; local in function:tty_init
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 in function:show_path
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 in function:main
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 in function:ask
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/sbin/scan_ffs/
scan_ffs.c 399 static int ttyfd = -2; local in function:show_status
405 if (ttyfd == -2)
406 ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC);
408 if (ttyfd == -1)
416 write(ttyfd, buf, (size_t)n);
  /src/bin/rcp/
rcp.c 828 static int ttyfd = -2; local in function:progress
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/bin/sh/
jobs.c 103 static int ttyfd = -1; variable in typeref:typename:int
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/usr.bin/gzip/
gzip.c 1730 static int ttyfd = -2; local in function:check_siginfo
1740 if (ttyfd == -2)
1741 ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC);
1743 if (ttyfd == -1)
1761 write(ttyfd, buf, (size_t)n);

Completed in 18 milliseconds