Lines Matching refs:s_pty
297 int m_pty = -1, s_pty;
312 s_pty = socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_OL2TP);
313 if (s_pty < 0) {
318 flags = fcntl(s_pty, F_GETFL);
319 if (flags == -1 || fcntl(s_pty, F_SETFL, flags | O_NONBLOCK) == -1) {
335 if (connect(s_pty, (struct sockaddr *)&sax, sizeof(sax)) < 0) {
340 snprintf (fdstr, sizeof(fdstr), "%d", s_pty);
342 if (pty_get(&m_pty, &s_pty) < 0) {
349 close(s_pty);
370 close(s_pty);
390 /* Close all file descriptors except s_pty */
392 if (i != s_pty) close(i);
395 /* Dup s_pty onto stdin and stdout */
397 dup2(s_pty, 0);
398 dup2(s_pty, 1);
399 if (s_pty > 1) close(s_pty);