Home
last modified time | relevance | path

Searched refs:master_fd (Results 1 – 7 of 7) sorted by relevance

/external/python/cpython2/Lib/
Dpty.py29 master_fd, slave_name = _open_terminal()
31 return master_fd, slave_fd
39 master_fd, slave_fd = os.openpty()
45 return master_fd, slave_name
58 tty_name, master_fd = sgi._getpty(os.O_RDWR, 0666, 0)
61 return master_fd, tty_name
107 master_fd, slave_fd = openpty()
112 os.close(master_fd)
128 return pid, master_fd
140 def _copy(master_fd, master_read=_read, stdin_read=_read): argument
[all …]
/external/selinux/restorecond/
Drestorecond.c66 static int master_fd = -1; variable
81 watch_list_free(master_fd); in done()
82 close(master_fd); in done()
118 close(master_fd); in term_handler()
186 master_fd = inotify_init(); in main()
187 if (master_fd < 0) in main()
198 return server(master_fd, user_watch_file); in main()
200 return server(master_fd, user_watch_file); in main()
205 read_config(master_fd, watch_file); in main()
212 while (watch(master_fd, watch_file) == 0) { in main()
[all …]
Duser.c237 int server(int master_fd, const char *watch_file) { in server() argument
248 read_config(master_fd, watch_file); in server()
254 GIOChannel *c = g_io_channel_unix_new(master_fd); in server()
/external/python/cpython2/Lib/test/
Dtest_pty.py70 master_fd, slave_name = pty.master_open()
72 (master_fd, slave_name))
87 orig_flags = fcntl.fcntl(master_fd, fcntl.F_GETFL)
88 fcntl.fcntl(master_fd, fcntl.F_SETFL, orig_flags | os.O_NONBLOCK)
90 s1 = os.read(master_fd, 1024)
96 fcntl.fcntl(master_fd, fcntl.F_SETFL, orig_flags)
100 s1 = os.read(master_fd, 1024)
107 s2 = os.read(master_fd, 1024)
111 os.close(master_fd)
116 pid, master_fd = pty.fork()
[all …]
/external/toybox/toys/pending/
Dtelnetd.c310 int pty_fd, new_fd, c = 0, w, master_fd = 0; in telnetd_main() local
317 master_fd = listen_socket(); in telnetd_main()
318 fcntl(master_fd, F_SETFD, FD_CLOEXEC); in telnetd_main()
319 if (master_fd > TT.gmax_fd) TT.gmax_fd = master_fd; in telnetd_main()
322 pty_fd = new_session(master_fd); //master_fd = 0 in telnetd_main()
344 if (!inetd_m) FD_SET(master_fd, &rd); in telnetd_main()
363 if (!inetd_m && FD_ISSET(master_fd, &rd)) { //accept new connection in telnetd_main()
364 new_fd = accept(master_fd, NULL, NULL); in telnetd_main()
/external/ppp/pppd/
Dsys-linux.c181 static int master_fd = -1; /* pty for old-style demand mode, master */ variable
377 if (master_fd >= 0) in sys_close()
378 close(master_fd); in sys_close()
700 int master_fd; in bundle_attach() local
705 master_fd = open("/dev/ppp", O_RDWR); in bundle_attach()
706 if (master_fd < 0) in bundle_attach()
708 if (ioctl(master_fd, PPPIOCATTACH, &ifnum) < 0) { in bundle_attach()
710 close(master_fd); in bundle_attach()
717 modify_flags(master_fd, 0, SC_MULTILINK); in bundle_attach()
718 close(master_fd); in bundle_attach()
[all …]
/external/python/cpython2/Modules/
Dposixmodule.c3926 int master_fd, slave_fd; in posix_openpty() local
3938 if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0) in posix_openpty()
3941 slave_name = _getpty(&master_fd, O_RDWR, 0666, 0); in posix_openpty()
3949 master_fd = open(DEV_PTY_FILE, O_RDWR | O_NOCTTY); /* open master */ in posix_openpty()
3950 if (master_fd < 0) in posix_openpty()
3954 if (grantpt(master_fd) < 0) { in posix_openpty()
3959 if (unlockpt(master_fd) < 0) { in posix_openpty()
3964 slave_name = ptsname(master_fd); /* get name of slave */ in posix_openpty()
3979 return Py_BuildValue("(ii)", master_fd, slave_fd); in posix_openpty()
3994 int master_fd = -1, result = 0; in posix_forkpty() local
[all …]