| /netbsd-src/external/bsd/tmux/dist/ |
| H A D | osdep-aix.c | 34 int f, ttyfd, retval; in osdep_get_name() local 37 if ((ttyfd = open(tty, O_RDONLY|O_NOCTTY)) == -1) in osdep_get_name() 40 retval = ioctl(ttyfd, TIOCGPGRP, &pgrp); in osdep_get_name() 41 close(ttyfd); in osdep_get_name() 67 int len, retval, ttyfd; in osdep_get_cwd() local 71 if ((ttyfd = open(ttypath, O_RDONLY|O_NOCTTY)) == -1) in osdep_get_cwd() 74 retval = ioctl(ttyfd, TIOCGPGRP, &pgrp); in osdep_get_cwd() 75 close(ttyfd); in osdep_get_cwd()
|
| H A D | osdep-sunos.c | 74 int retval, ttyfd; in osdep_get_cwd() local 78 if ((ttyfd = open(ttypath, O_RDONLY|O_NOCTTY)) == -1) in osdep_get_cwd() 81 retval = ioctl(ttyfd, TIOCGPGRP, &pgrp); in osdep_get_cwd() 82 close(ttyfd); in osdep_get_cwd()
|
| /netbsd-src/usr.bin/write/ |
| H A D | write.c | 79 int msgsok, ttyfd; in main() local 86 ttyfd = -1; in main() 93 ttyfd = search_utmp(argv[1], mytty, myuid, saved_egid); in main() 103 ttyfd = term_chk(uid, argv[2], &msgsok, &atime, 0, saved_egid); in main() 104 if (ttyfd == -1) in main() 116 do_write(ttyfd, mytty, myuid); in main() 216 do_write(int ttyfd, const char *mytty, const uid_t myuid) in do_write() argument 231 if (dup2(ttyfd, STDOUT_FILENO) == -1) in do_write() 236 (void)close(ttyfd); in do_write()
|
| /netbsd-src/external/bsd/ekermit/dist/ |
| H A D | unixio.c | 66 static int ttyfd, ofile = -1; /* File descriptors */ variable 131 ttyfd = 0; in devopen() 144 if (ttyfd < 0) /* Device must be open */ in pktmode() 180 ttyfd = -1; in devclose() 198 if (ttyfd < 0) /* Device must be open */ in inchk() 203 if (ttyfd < 0) in inchk() 208 if (ttyfd < 0) in inchk() 213 if (ttyfd < 0) in inchk() 260 if (ttyfd < 0 || !p) { /* Device not open or no buffer */ in readpkt() 328 x = write(ttyfd,p,n); in tx_data()
|
| /netbsd-src/bin/pax/ |
| H A D | tty_subs.c | 81 int ttyfd; in tty_init() local 83 if ((ttyfd = open(DEVTTY, O_RDWR)) >= 0) { in tty_init() 84 if ((ttyoutf = fdopen(ttyfd, "w")) != NULL) { in tty_init() 85 if ((ttyinf = fdopen(ttyfd, "r")) != NULL) in tty_init() 89 (void)close(ttyfd); in tty_init()
|
| /netbsd-src/usr.bin/find/ |
| H A D | misc.c | 140 static int ttyfd = -2; in show_path() local 153 if (ttyfd == -2) in show_path() 154 ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC); in show_path() 156 if (ttyfd == -1) in show_path() 165 write(ttyfd, buf, (size_t)n); in show_path()
|
| /netbsd-src/crypto/external/bsd/openssh/dist/ |
| H A D | session.c | 541 int fdout, ptyfd, ttyfd, ptymaster; in do_exec_pty() local 547 ttyfd = s->ttyfd; in do_exec_pty() 558 close(ttyfd); in do_exec_pty() 565 close(ttyfd); in do_exec_pty() 577 close(ttyfd); in do_exec_pty() 590 pty_make_controlling_tty(&ttyfd, s->tty); in do_exec_pty() 593 if (dup2(ttyfd, 0) == -1) in do_exec_pty() 595 if (dup2(ttyfd, 1) == -1) in do_exec_pty() 597 if (dup2(ttyfd, 2) == -1) in do_exec_pty() 601 close(ttyfd); in do_exec_pty() [all …]
|
| H A D | sshpty.c | 48 pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) in pty_allocate() argument 53 i = openpty(ptyfd, ttyfd, buf, NULL, NULL); in pty_allocate() 76 pty_make_controlling_tty(int *ttyfd, const char *tty) in pty_make_controlling_tty() argument 103 if (ioctl(*ttyfd, TIOCSCTTY, NULL) == -1) in pty_make_controlling_tty()
|
| H A D | readpass.c | 127 int rppflags, ttyfd, use_askpass = 0, allow_askpass = 0; in read_passphrase() local 156 ttyfd = open(_PATH_TTY, O_RDWR); in read_passphrase() 157 if (ttyfd >= 0) { in read_passphrase() 164 (void)write(ttyfd, &cr, 1); in read_passphrase() 165 close(ttyfd); in read_passphrase()
|
| H A D | session.h | 45 int ptyfd, ttyfd, ptymaster; member
|
| H A D | monitor_wrap.c | 623 mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) in mm_pty_allocate() argument 668 (*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1) in mm_pty_allocate() 681 if (s->ttyfd == -1) in mm_session_pty_cleanup2() 696 s->ttyfd = -1; in mm_session_pty_cleanup2()
|
| /netbsd-src/usr.bin/patch/ |
| H A D | util.c | 263 static int ttyfd = -1; in ask() local 269 if (ttyfd < 0) in ask() 270 ttyfd = open(_PATH_TTY, O_RDONLY); in ask() 271 if (ttyfd >= 0) { in ask() 272 if ((nr = read(ttyfd, buf, bufsz)) > 0 && in ask() 276 if (ttyfd < 0 || nr <= 0) { in ask()
|
| /netbsd-src/sbin/scan_ffs/ |
| H A D | scan_ffs.c | 399 static int ttyfd = -2; in show_status() local 405 if (ttyfd == -2) in show_status() 406 ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC); in show_status() 408 if (ttyfd == -1) in show_status() 416 write(ttyfd, buf, (size_t)n); in show_status()
|
| /netbsd-src/external/gpl2/xcvs/dist/src/ |
| H A D | main.c | 510 static int ttyfd = -2; in show_status() local 512 if (ttyfd == -2) in show_status() 513 ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC); in show_status() 515 if (ttyfd == -1) in show_status() 524 write(ttyfd, buf, (size_t)n); in show_status()
|
| /netbsd-src/bin/rcp/ |
| H A D | rcp.c | 828 static int ttyfd = -2; in progress() local 833 if (ttyfd == -2) in progress() 834 ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC); in progress() 836 if (ttyfd == -1) in progress() 846 write(ttyfd, buf, (size_t)n); in progress()
|
| /netbsd-src/usr.bin/gzip/ |
| H A D | gzip.c | 1730 static int ttyfd = -2; in check_siginfo() local 1740 if (ttyfd == -2) in check_siginfo() 1741 ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC); in check_siginfo() 1743 if (ttyfd == -1) in check_siginfo() 1761 write(ttyfd, buf, (size_t)n); in check_siginfo()
|