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()
121 close(master_fd); in term_handler()
189 master_fd = inotify_init(); in main()
190 if (master_fd < 0) in main()
201 return server(master_fd, user_watch_file); in main()
203 return server(master_fd, user_watch_file); in main()
208 read_config(master_fd, watch_file); in main()
217 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/cpython3/Lib/test/
Dtest_pty.py69 master_fd, slave_name = pty.master_open()
71 (master_fd, slave_name))
86 blocking = os.get_blocking(master_fd)
88 os.set_blocking(master_fd, False)
90 s1 = os.read(master_fd, 1024)
97 os.set_blocking(master_fd, blocking)
101 s1 = os.read(master_fd, 1024)
108 s2 = os.read(master_fd, 1024)
112 os.close(master_fd)
117 pid, master_fd = pty.fork()
[all …]
Dtest_os.py2995 master_fd, slave_fd = os.openpty()
2996 self.addCleanup(os.close, master_fd)
2998 self.assertEqual(os.get_inheritable(master_fd), False)
/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/ltp/testcases/cve/
Dcve-2014-0196.c54 static volatile int master_fd, slave_fd; variable
106 create_pty((int *)&master_fd, (int *)&slave_fd); in run()
116 tcgetattr(master_fd, &t); in run()
119 tcsetattr(master_fd, TCSANOW, &t); in run()
125 SAFE_WRITE(0, master_fd, "A", 1); in run()
139 ioctl(master_fd, 0xdeadbeef); in run()
141 SAFE_CLOSE(master_fd); in run()
159 close(master_fd); in cleanup()
/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.c5782 int master_fd = -1, slave_fd = -1; in os_openpty_impl() local
5794 if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0) in os_openpty_impl()
5797 if (_Py_set_inheritable(master_fd, 0, NULL) < 0) in os_openpty_impl()
5803 slave_name = _getpty(&master_fd, O_RDWR, 0666, 0); in os_openpty_impl()
5806 if (_Py_set_inheritable(master_fd, 0, NULL) < 0) in os_openpty_impl()
5814 master_fd = open(DEV_PTY_FILE, O_RDWR | O_NOCTTY); /* open master */ in os_openpty_impl()
5815 if (master_fd < 0) in os_openpty_impl()
5821 if (grantpt(master_fd) < 0) { in os_openpty_impl()
5827 if (unlockpt(master_fd) < 0) { in os_openpty_impl()
5834 slave_name = ptsname(master_fd); /* get name of slave */ in os_openpty_impl()
[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 …]