Home
last modified time | relevance | path

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

12

/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.c41 static volatile int master_fd, slave_fd; variable
90 create_pty((int *)&master_fd, (int *)&slave_fd); in run()
100 tcgetattr(master_fd, &t); in run()
103 tcsetattr(master_fd, TCSANOW, &t); in run()
106 SAFE_WRITE(0, master_fd, "A", 1); in run()
119 ioctl(master_fd, 0xdeadbeef); in run()
121 SAFE_CLOSE(master_fd); in run()
136 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.py93 master_fd, slave_name = pty.master_open()
95 (master_fd, slave_name))
110 blocking = os.get_blocking(master_fd)
112 os.set_blocking(master_fd, False)
114 s1 = os.read(master_fd, 1024)
121 os.set_blocking(master_fd, blocking)
125 s1 = _readline(master_fd)
132 s2 = _readline(master_fd)
139 os.close(master_fd)
143 pid, master_fd = pty.fork()
[all …]
Dtest_os.py3545 master_fd, slave_fd = os.openpty()
3546 self.addCleanup(os.close, master_fd)
3548 self.assertEqual(os.get_inheritable(master_fd), False)
/external/toybox/toys/pending/
Dtelnetd.c307 int pty_fd, new_fd, c = 0, w, master_fd = 0; in telnetd_main() local
314 master_fd = listen_socket(); in telnetd_main()
315 fcntl(master_fd, F_SETFD, FD_CLOEXEC); in telnetd_main()
316 if (master_fd > TT.gmax_fd) TT.gmax_fd = master_fd; in telnetd_main()
319 pty_fd = new_session(master_fd); //master_fd = 0 in telnetd_main()
341 if (!inetd_m) FD_SET(master_fd, &rd); in telnetd_main()
360 if (!inetd_m && FD_ISSET(master_fd, &rd)) { //accept new connection in telnetd_main()
361 new_fd = accept(master_fd, NULL, NULL); in telnetd_main()
/external/igt-gpu-tools/tests/
Dkms_lease.c989 static void check_crtc_masks(int master_fd, int lease_fd, uint32_t crtc_mask) in check_crtc_masks() argument
995 resources = drmModeGetResources(master_fd); in check_crtc_masks()
997 plane_resources = drmModeGetPlaneResources(master_fd); in check_crtc_masks()
1004 master_e = drmModeGetEncoder(master_fd, resources->encoders[i]); in check_crtc_masks()
1023 master_p = drmModeGetPlane(master_fd, plane_resources->planes[i]); in check_crtc_masks()
1049 int master_fd = data->master.fd; in possible_crtcs_filtering() local
1051 resources = drmModeGetResources(master_fd); in possible_crtcs_filtering()
1053 plane_resources = drmModeGetPlaneResources(master_fd); in possible_crtcs_filtering()
1076 igt_assert_eq(create_lease(master_fd, &mcl), 0); in possible_crtcs_filtering()
1081 check_crtc_masks(master_fd, lease_fd, 1 << i); in possible_crtcs_filtering()
[all …]
/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/mesa3d/src/freedreno/vulkan/
Dtu_drm.c310 int master_fd = -1; in tu_drm_device_init() local
363 master_fd = in tu_drm_device_init()
365 if (master_fd >= 0) { in tu_drm_device_init()
370 device->master_fd = master_fd; in tu_drm_device_init()
401 if (master_fd != -1) in tu_drm_device_init()
402 close(master_fd); in tu_drm_device_init()
Dtu_wsi.c47 physical_device->master_fd, NULL, in tu_wsi_init()
Dtu_device.c126 if (device->master_fd != -1) in tu_physical_device_init()
127 close(device->master_fd); in tu_physical_device_init()
140 if (device->master_fd != -1) in tu_physical_device_finish()
141 close(device->master_fd); in tu_physical_device_finish()
Dtu_kgsl.c234 device->master_fd = -1; in tu_enumerate_devices()
Dtu_private.h195 int master_fd; member
/external/mesa3d/src/intel/vulkan/
Danv_device.c307 int master_fd = -1; in anv_physical_device_try_create() local
539 master_fd = open(primary_path, O_RDWR | O_CLOEXEC); in anv_physical_device_try_create()
540 if (master_fd >= 0) { in anv_physical_device_try_create()
544 if (anv_gem_get_param(master_fd, I915_PARAM_CHIPSET_ID) == 0) { in anv_physical_device_try_create()
545 close(master_fd); in anv_physical_device_try_create()
546 master_fd = -1; in anv_physical_device_try_create()
550 device->master_fd = master_fd; in anv_physical_device_try_create()
576 if (master_fd != -1) in anv_physical_device_try_create()
577 close(master_fd); in anv_physical_device_try_create()
589 if (device->master_fd >= 0) in anv_physical_device_destroy()
[all …]
Danv_wsi.c87 physical_device->master_fd, in anv_init_wsi()
/external/libdrm/amdgpu/
Damdgpu_cs.c147 int master_fd, in amdgpu_cs_ctx_override_priority() argument
153 if (!dev || !context || master_fd < 0) in amdgpu_cs_ctx_override_priority()
163 r = drmCommandWrite(master_fd, DRM_AMDGPU_SCHED, &args, sizeof(args)); in amdgpu_cs_ctx_override_priority()
Damdgpu.h926 int master_fd,
/external/mesa3d/src/amd/vulkan/
Dradv_wsi.c59 physical_device->master_fd, in radv_init_wsi()
Dradv_device.c302 int master_fd = -1; in radv_physical_device_try_create() local
367 master_fd = open(drm_device->nodes[DRM_NODE_PRIMARY], O_RDWR | O_CLOEXEC); in radv_physical_device_try_create()
368 if (master_fd >= 0) { in radv_physical_device_try_create()
376 …if (drmCommandWrite(master_fd, DRM_AMDGPU_INFO, &request, sizeof (struct drm_amdgpu_info)) < 0 || … in radv_physical_device_try_create()
377 close(master_fd); in radv_physical_device_try_create()
378 master_fd = -1; in radv_physical_device_try_create()
383 device->master_fd = master_fd; in radv_physical_device_try_create()
480 if (master_fd != -1) in radv_physical_device_try_create()
481 close(master_fd); in radv_physical_device_try_create()
493 if (device->master_fd != -1) in radv_physical_device_destroy()
[all …]
Dradv_private.h292 int master_fd; member
/external/python/cpython3/Modules/
Dposixmodule.c6574 int master_fd = -1, slave_fd = -1; in os_openpty_impl() local
6586 if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0) in os_openpty_impl()
6589 if (_Py_set_inheritable(master_fd, 0, NULL) < 0) in os_openpty_impl()
6595 slave_name = _getpty(&master_fd, O_RDWR, 0666, 0); in os_openpty_impl()
6598 if (_Py_set_inheritable(master_fd, 0, NULL) < 0) in os_openpty_impl()
6606 master_fd = open(DEV_PTY_FILE, O_RDWR | O_NOCTTY); /* open master */ in os_openpty_impl()
6607 if (master_fd < 0) in os_openpty_impl()
6613 if (grantpt(master_fd) < 0) { in os_openpty_impl()
6619 if (unlockpt(master_fd) < 0) { in os_openpty_impl()
6626 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 …]

12