Lines Matching refs:w
21 wwgetpty(w) in wwgetpty() argument
22 register struct ww *w; in wwgetpty()
32 (void) strcpy(w->ww_ttyname, PTY);
34 w->ww_ttyname[_PT] = 'p';
35 w->ww_ttyname[_PQRS] = c;
36 w->ww_ttyname[_0_9] = '0';
37 if (access(w->ww_ttyname, 0) < 0)
40 w->ww_ttyname[_PT] = 'p';
41 w->ww_ttyname[_0_9] = *p;
42 if ((w->ww_pty = open(w->ww_ttyname, 2)) < 0)
44 w->ww_ttyname[_PT] = 't';
45 if ((tty = open(w->ww_ttyname, 2)) < 0) {
46 (void) close(w->ww_pty);
50 if (ioctl(w->ww_pty, TIOCPKT, (char *)&on) < 0) {
51 (void) close(w->ww_pty);
54 (void) fcntl(w->ww_pty, F_SETFD, 1);
58 w->ww_pty = -1;