Home
last modified time | relevance | path

Searched refs:master_fd (Results 1 – 12 of 12) 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/python/cpython3/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
96 master_fd, slave_fd = openpty()
101 os.close(master_fd)
117 return pid, master_fd
129 def _copy(master_fd, master_read=_read, stdin_read=_read): argument
134 fds = [master_fd, STDIN_FILENO]
137 if master_fd in rfds:
[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()
122 close(master_fd); in term_handler()
192 master_fd = inotify_init(); in main()
193 if (master_fd < 0) in main()
204 return server(master_fd, user_watch_file); in main()
206 return server(master_fd, user_watch_file); in main()
210 read_config(master_fd, watch_file); in main()
219 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/ltp/testcases/cve/
Dcve-2014-0196.c53 static volatile int master_fd, slave_fd; variable
102 create_pty((int *)&master_fd, (int *)&slave_fd); in run()
112 tcgetattr(master_fd, &t); in run()
115 tcsetattr(master_fd, TCSANOW, &t); in run()
118 SAFE_WRITE(0, master_fd, "A", 1); in run()
131 ioctl(master_fd, 0xdeadbeef); in run()
133 SAFE_CLOSE(master_fd); in run()
148 close(master_fd); in cleanup()
/external/python/cpython2/Lib/test/
Dtest_pty.py84 master_fd, slave_name = pty.master_open()
86 (master_fd, slave_name))
101 orig_flags = fcntl.fcntl(master_fd, fcntl.F_GETFL)
102 fcntl.fcntl(master_fd, fcntl.F_SETFL, orig_flags | os.O_NONBLOCK)
104 s1 = os.read(master_fd, 1024)
110 fcntl.fcntl(master_fd, fcntl.F_SETFL, orig_flags)
114 s1 = _readline(master_fd)
121 s2 = _readline(master_fd)
125 os.close(master_fd)
130 pid, master_fd = pty.fork()
[all …]
/external/python/cpython3/Lib/test/
Dtest_pty.py82 master_fd, slave_name = pty.master_open()
84 (master_fd, slave_name))
99 blocking = os.get_blocking(master_fd)
101 os.set_blocking(master_fd, False)
103 s1 = os.read(master_fd, 1024)
110 os.set_blocking(master_fd, blocking)
114 s1 = _readline(master_fd)
121 s2 = _readline(master_fd)
125 os.close(master_fd)
130 pid, master_fd = pty.fork()
[all …]
Dtest_os.py3262 master_fd, slave_fd = os.openpty()
3263 self.addCleanup(os.close, master_fd)
3265 self.assertEqual(os.get_inheritable(master_fd), False)
/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/cpython3/Modules/
Dposixmodule.c5939 int master_fd = -1, slave_fd = -1; in os_openpty_impl() local
5951 if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0) in os_openpty_impl()
5954 if (_Py_set_inheritable(master_fd, 0, NULL) < 0) in os_openpty_impl()
5960 slave_name = _getpty(&master_fd, O_RDWR, 0666, 0); in os_openpty_impl()
5963 if (_Py_set_inheritable(master_fd, 0, NULL) < 0) in os_openpty_impl()
5971 master_fd = open(DEV_PTY_FILE, O_RDWR | O_NOCTTY); /* open master */ in os_openpty_impl()
5972 if (master_fd < 0) in os_openpty_impl()
5978 if (grantpt(master_fd) < 0) { in os_openpty_impl()
5984 if (unlockpt(master_fd) < 0) { in os_openpty_impl()
5991 slave_name = ptsname(master_fd); /* get name of slave */ in os_openpty_impl()
[all …]
/external/python/cpython2/Modules/
Dposixmodule.c3950 int master_fd, slave_fd; in posix_openpty() local
3962 if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0) in posix_openpty()
3965 slave_name = _getpty(&master_fd, O_RDWR, 0666, 0); in posix_openpty()
3973 master_fd = open(DEV_PTY_FILE, O_RDWR | O_NOCTTY); /* open master */ in posix_openpty()
3974 if (master_fd < 0) in posix_openpty()
3978 if (grantpt(master_fd) < 0) { in posix_openpty()
3983 if (unlockpt(master_fd) < 0) { in posix_openpty()
3988 slave_name = ptsname(master_fd); /* get name of slave */ in posix_openpty()
4003 return Py_BuildValue("(ii)", master_fd, slave_fd); in posix_openpty()
4018 int master_fd = -1, result = 0; in posix_forkpty() local
[all …]