Lines Matching refs:ttyfd
481 int fdout, ptyfd, ttyfd, ptymaster;
487 ttyfd = s->ttyfd;
498 close(ttyfd);
505 close(ttyfd);
517 close(ttyfd);
533 pty_make_controlling_tty(&ttyfd, s->tty);
536 if (dup2(ttyfd, 0) < 0)
538 if (dup2(ttyfd, 1) < 0)
540 if (dup2(ttyfd, 2) < 0)
544 close(ttyfd);
573 close(ttyfd);
651 if (s->ttyfd != -1) {
669 else if (s->ttyfd == -1) {
677 if (s->ttyfd != -1)
1109 if (s->ttyfd != -1)
1432 if (s->ttyfd != -1) {
1526 session_setup_sia(pw, s->ttyfd == -1 ? NULL : s->tty);
1715 sessions[id].ttyfd = -1;
1805 if (s->used && s->ttyfd != -1 && strcmp(s->tty, tty) == 0) {
1892 if (s->ttyfd != -1) {
1910 if (!PRIVSEP(pty_allocate(&s->ptyfd, &s->ttyfd, s->tty,
1915 s->ttyfd = -1;
1922 tty_parse_modes(s->ttyfd, &n_bytes);
2160 if (s->ttyfd == -1)
2183 s->ttyfd = -1;
2324 if (s->ttyfd != -1)
2355 if (s->ttyfd != -1)
2382 if (s->ttyfd != -1)
2426 if (s->used && s->ttyfd != -1) {