Home
last modified time | relevance | path

Searched refs:pipe_fds (Results 1 – 25 of 26) sorted by relevance

12

/external/libwebsockets/lib/plat/windows/
Dwindows-spawn.c121 if (lsp->pipe_fds[n][!!(n == 0)]) { in lws_spawn_piped_destroy()
122 CloseHandle(lsp->pipe_fds[n][n == 0]); in lws_spawn_piped_destroy()
123 lsp->pipe_fds[n][n == 0] = NULL; in lws_spawn_piped_destroy()
268 if (wsi && lsp->pipe_fds[LWS_STDOUT][0] != NULL) { in windows_pipe_poll_hack()
269 if (!PeekNamedPipe(lsp->pipe_fds[LWS_STDOUT][0], &c, 1, &br, in windows_pipe_poll_hack()
274 lsp->pipe_fds[LWS_STDOUT][0] = NULL; in windows_pipe_poll_hack()
286 lsp->pipe_fds[LWS_STDIN][1] = NULL; in windows_pipe_poll_hack()
307 if (wsi1 && lsp->pipe_fds[LWS_STDERR][0]) { in windows_pipe_poll_hack()
308 if (!PeekNamedPipe(lsp->pipe_fds[LWS_STDERR][0], &c, 1, &br, in windows_pipe_poll_hack()
319 lsp->pipe_fds[LWS_STDERR][0] = NULL; in windows_pipe_poll_hack()
[all …]
/external/ltp/testcases/kernel/syscalls/pwrite/
Dpwrite02.c30 static int pipe_fds[2]; variable
40 {buf, sizeof(buf), &pipe_fds[1], 0, ESPIPE},
81 SAFE_PIPE(pipe_fds); in setup()
95 if (pipe_fds[0] > 0) in cleanup()
96 SAFE_CLOSE(pipe_fds[0]); in cleanup()
98 if (pipe_fds[1] > 0) in cleanup()
99 SAFE_CLOSE(pipe_fds[1]); in cleanup()
/external/tensorflow/tensorflow/lite/experimental/acceleration/mini_benchmark/
Drunner.cc201 int pipe_fds[2]; in Run()
203 if (pipe(pipe_fds) < 0) { in Run()
208 "pipe:", pipe_fds[0], ":", pipe_fds[1], ":", model->GetSize()); in Run()
225 close(pipe_fds[0]); in Run()
230 (written_bytes = write(pipe_fds[1], buffer, remaining_bytes)) > 0) { in Run()
234 close(pipe_fds[1]); in Run()
280 int pipe_fds[2]; in RunInprocess() local
281 if (pipe(pipe_fds) < 0) { in RunInprocess()
288 absl::StrCat("pipe:", pipe_fds[0], ":-1:", model->GetSize())); in RunInprocess()
292 write_thread = std::thread([pipe_fds, model]() { in RunInprocess()
[all …]
Dmodel_loader_test.cc82 int pipe_fds[2]; in TEST_F() local
83 ASSERT_EQ(pipe(pipe_fds), 0); in TEST_F()
87 close(pipe_fds[0]); in TEST_F()
92 (written_bytes = write(pipe_fds[1], buffer, remaining_bytes)) > 0) { in TEST_F()
96 close(pipe_fds[1]); in TEST_F()
104 close(pipe_fds[1]); in TEST_F()
106 std::make_unique<PipeModelLoader>(pipe_fds[0], fbb.GetSize()); in TEST_F()
/external/ltp/testcases/kernel/syscalls/fcntl/
Dfcntl07.c69 static int file_fd, pipe_fds[2], fifo_fd; variable
78 {pipe_fds, "pipe (write end)"},
79 {pipe_fds+1, "pipe (read end)"},
171 SAFE_PIPE(cleanup, pipe_fds); in setup()
181 if (pipe_fds[0] > 0 && close(pipe_fds[0])) in cleanup()
184 if (pipe_fds[1] > 0 && close(pipe_fds[1])) in cleanup()
Dfcntl31.c67 static int pipe_fds[2]; variable
108 SAFE_PIPE(cleanup, pipe_fds); in setup()
109 test_fd = pipe_fds[0]; in setup()
294 fd = pipe_fds[1]; in signal_parent()
295 close(pipe_fds[0]); in signal_parent()
365 if (pipe_fds[0] > 0 && close(pipe_fds[0]) == -1) in cleanup()
366 tst_resm(TWARN | TERRNO, "close(%d) failed", pipe_fds[0]); in cleanup()
367 if (pipe_fds[1] > 0 && close(pipe_fds[1]) == -1) in cleanup()
368 tst_resm(TWARN | TERRNO, "close(%d) failed", pipe_fds[1]); in cleanup()
Dfcntl30.c46 int pipe_fds[2], test_fd; in main() local
57 SAFE_PIPE(cleanup, pipe_fds); in main()
58 test_fd = pipe_fds[1]; in main()
86 SAFE_CLOSE(cleanup, pipe_fds[0]); in main()
87 SAFE_CLOSE(cleanup, pipe_fds[1]); in main()
/external/libwebsockets/lib/plat/unix/
Dunix-spawn.c129 if (lsp->pipe_fds[n][!!(n == 0)] == 0) in lws_spawn_piped_destroy()
132 if (lsp->pipe_fds[n][!!(n == 0)] >= 0) { in lws_spawn_piped_destroy()
133 close(lsp->pipe_fds[n][!!(n == 0)]); in lws_spawn_piped_destroy()
134 lsp->pipe_fds[n][!!(n == 0)] = LWS_SOCK_INVALID; in lws_spawn_piped_destroy()
358 lsp->pipe_fds[n][0] = -1; in lws_spawn_piped()
359 lsp->pipe_fds[n][1] = -1; in lws_spawn_piped()
365 if (pipe(lsp->pipe_fds[n]) == -1) in lws_spawn_piped()
367 lws_plat_apply_FD_CLOEXEC(lsp->pipe_fds[n][n == 0]); in lws_spawn_piped()
394 lsp->stdwsi[n], n, lsp->pipe_fds[n][n == 0], in lws_spawn_piped()
395 lsp->pipe_fds[n][n != 0]); in lws_spawn_piped()
[all …]
/external/libcap/progs/old/
Dsucap.c58 int pipe_fds[2]; in main() local
96 if (pipe(pipe_fds)) { in main()
130 close(pipe_fds[0]); in main()
152 close(pipe_fds[1]); /* Child hangs in blocking read */ in main()
183 close(pipe_fds[1]); in main()
186 wait_on_fd(pipe_fds[0]); in main()
/external/tensorflow/tensorflow/tsl/platform/default/
Dsubprocess.cc196 int pipe_fds[2]; in Start() local
197 if (pipe(pipe_fds) < 0) { in Start()
204 parent_pipe_[i] = pipe_fds[1]; in Start()
205 child_pipe_[i] = pipe_fds[0]; in Start()
207 parent_pipe_[i] = pipe_fds[0]; in Start()
208 child_pipe_[i] = pipe_fds[1]; in Start()
348 int pipe_fds[2]; in Start() local
349 if (pipe(pipe_fds) < 0) { in Start()
356 parent_pipe_[i] = pipe_fds[1]; in Start()
357 child_pipe_[i] = pipe_fds[0]; in Start()
[all …]
/external/liburing/test/
Dopenat2.c176 int ret, pipe_fds[2]; in test_direct_reinstall() local
179 if (pipe2(pipe_fds, O_NONBLOCK)) { in test_direct_reinstall()
188 ret = io_uring_register_files(&ring, pipe_fds, 2); in test_direct_reinstall()
224 ret2 = read(pipe_fds[0], buf, 1); in test_direct_reinstall()
230 close(pipe_fds[0]); in test_direct_reinstall()
231 close(pipe_fds[1]); in test_direct_reinstall()
/external/parameter-framework/asio-1.10.6/include/asio/detail/impl/
Dpipe_select_interrupter.ipp39 int pipe_fds[2];
40 if (pipe(pipe_fds) == 0)
42 read_descriptor_ = pipe_fds[0];
44 write_descriptor_ = pipe_fds[1];
/external/linux-kselftest/tools/testing/selftests/pidfd/
Dpidfd_test.c244 int pipe_fds[2]; in test_pidfd_send_signal_recycled_pid_fail() local
248 ret = pipe2(pipe_fds, O_CLOEXEC); in test_pidfd_send_signal_recycled_pid_fail()
257 close(pipe_fds[1]); in test_pidfd_send_signal_recycled_pid_fail()
258 (void)read(pipe_fds[0], &c, 1); in test_pidfd_send_signal_recycled_pid_fail()
259 close(pipe_fds[0]); in test_pidfd_send_signal_recycled_pid_fail()
268 close(pipe_fds[0]); in test_pidfd_send_signal_recycled_pid_fail()
270 close(pipe_fds[1]); in test_pidfd_send_signal_recycled_pid_fail()
/external/compiler-rt/lib/sanitizer_common/tests/
Dsanitizer_linux_test.cc267 int pipe_fds[2]; in TEST() local
268 ASSERT_EQ(0, pipe(pipe_fds)); in TEST()
276 /* stdin */ kInvalidFd, /* stdout */ pipe_fds[1]); in TEST()
288 while (ReadFromFile(pipe_fds[0], ptr, 256, &bytes_read)) { in TEST()
298 internal_close(pipe_fds[0]); in TEST()
/external/minijail/
Dlibminijail.c2235 static void parent_setup_complete(int *pipe_fds) in parent_setup_complete() argument
2237 close_and_reset(&pipe_fds[0]); in parent_setup_complete()
2238 close_and_reset(&pipe_fds[1]); in parent_setup_complete()
2245 static void wait_for_parent_setup(int *pipe_fds) in wait_for_parent_setup() argument
2249 close_and_reset(&pipe_fds[1]); in wait_for_parent_setup()
2252 if (read(pipe_fds[0], &buf, 1) != 0) in wait_for_parent_setup()
2254 close_and_reset(&pipe_fds[0]); in wait_for_parent_setup()
3029 int pipe_fds[2]; member
3043 int *pipe_fds[] = { in avoid_pipe_conflicts() local
3044 state->pipe_fds, state->child_sync_pipe_fds, state->stdin_fds, in avoid_pipe_conflicts()
[all …]
Dlibminijail_unittest.cc868 int pipe_fds[2]; in TEST() local
873 ASSERT_EQ(pipe(pipe_fds), 0); in TEST()
880 ASSERT_EQ(read(pipe_fds[0], &pid_in_parent, pid_size), pid_size); in TEST()
885 EXPECT_EQ(write(pipe_fds[1], &mj_fork_ret, pid_size), pid_size); in TEST()
1832 int pipe_fds[2]; in TestCreateSession() local
1845 ASSERT_EQ(pipe(pipe_fds), 0); in TestCreateSession()
1846 minijail_preserve_fd(j.get(), pipe_fds[0], pipe_fds[0]); in TestCreateSession()
1852 ASSERT_EQ(read(pipe_fds[0], &sid_in_parent, pid_size), pid_size); in TestCreateSession()
1860 EXPECT_EQ(write(pipe_fds[1], &parent_sid, pid_size), pid_size); in TestCreateSession()
/external/cronet/net/third_party/quiche/src/quiche/quic/qbone/bonnet/
Dicmp_reachable_test.cc91 int pipe_fds[2]; in IcmpReachableTest() local
92 QUICHE_CHECK(pipe(pipe_fds) >= 0) << "pipe() failed"; in IcmpReachableTest()
94 read_fd_ = pipe_fds[0]; in IcmpReachableTest()
95 read_src_fd_ = pipe_fds[1]; in IcmpReachableTest()
/external/libchrome/base/process/
Dprocess_util_unittest.cc1052 int pipe_fds[2]; in TEST_F() local
1053 int result = pipe(pipe_fds); in TEST_F()
1057 result = dup2(pipe_fds[1], STDOUT_FILENO); in TEST_F()
1072 result = IGNORE_EINTR(close(pipe_fds[1])); in TEST_F()
1083 EXPECT_EQ(1, HANDLE_EINTR(read(pipe_fds[0], buf, sizeof(buf)))); in TEST_F()
1086 result = IGNORE_EINTR(close(pipe_fds[0])); in TEST_F()
1268 int pipe_fds[2]; in TEST_F() local
1269 ASSERT_EQ(0, pipe(pipe_fds)); in TEST_F()
1271 ScopedFD read_fd(pipe_fds[0]); in TEST_F()
1272 ScopedFD write_fd(pipe_fds[1]); in TEST_F()
/external/python/cpython2/Lib/test/
Dtest_pty.py235 pipe_fds = os.pipe()
236 self.fds.extend(pipe_fds)
237 return pipe_fds
/external/cronet/base/process/
Dprocess_util_unittest.cc1145 int pipe_fds[2]; in TEST_F() local
1146 int result = pipe(pipe_fds); in TEST_F()
1150 result = dup2(pipe_fds[1], STDOUT_FILENO); in TEST_F()
1165 result = IGNORE_EINTR(close(pipe_fds[1])); in TEST_F()
1176 EXPECT_EQ(1, HANDLE_EINTR(read(pipe_fds[0], buf, sizeof(buf)))); in TEST_F()
1179 result = IGNORE_EINTR(close(pipe_fds[0])); in TEST_F()
1272 int pipe_fds[2]; in TEST_F() local
1273 ASSERT_EQ(0, pipe(pipe_fds)); in TEST_F()
1275 ScopedFD read_fd(pipe_fds[0]); in TEST_F()
1276 ScopedFD write_fd(pipe_fds[1]); in TEST_F()
/external/crosvm/base/src/sys/unix/
Dmod.rs390 let mut pipe_fds = [-1; 2]; in pipe() localVariable
393 let ret = unsafe { pipe2(&mut pipe_fds[0], flags) }; in pipe()
401 File::from_raw_fd(pipe_fds[0]), in pipe()
402 File::from_raw_fd(pipe_fds[1]), in pipe()
/external/python/cpython3/Lib/test/
Dtest_pty.py360 pipe_fds = os.pipe()
361 self.fds.extend(pipe_fds)
362 return pipe_fds
/external/linux-kselftest/tools/testing/selftests/vm/
Dprotection_keys.c1128 int pipe_fds[2]; in test_kernel_gup_of_access_disabled_region() local
1130 pipe_ret = pipe(pipe_fds); in test_kernel_gup_of_access_disabled_region()
1138 vmsplice_ret = vmsplice(pipe_fds[1], &iov, 1, SPLICE_F_GIFT); in test_kernel_gup_of_access_disabled_region()
1142 close(pipe_fds[0]); in test_kernel_gup_of_access_disabled_region()
1143 close(pipe_fds[1]); in test_kernel_gup_of_access_disabled_region()
/external/linux-kselftest/tools/testing/selftests/landlock/
Dfs_test.c2020 int pipe_fds[2]; in TEST_F_FORK() local
2043 ASSERT_EQ(0, pipe2(pipe_fds, O_CLOEXEC)); in TEST_F_FORK()
2044 ASSERT_EQ(1, write(pipe_fds[1], ".", 1)) { in TEST_F_FORK()
2047 ASSERT_EQ(1, read(pipe_fds[0], &buf, 1)); in TEST_F_FORK()
2051 proc_fd = open_proc_fd(_metadata, pipe_fds[1], O_WRONLY | O_CLOEXEC); in TEST_F_FORK()
2055 pipe_fds[1], strerror(errno)); in TEST_F_FORK()
2060 proc_fd = open_proc_fd(_metadata, pipe_fds[0], O_RDONLY | O_CLOEXEC); in TEST_F_FORK()
2065 pipe_fds[1], strerror(errno)); in TEST_F_FORK()
2069 ASSERT_EQ(0, close(pipe_fds[0])); in TEST_F_FORK()
2070 ASSERT_EQ(0, close(pipe_fds[1])); in TEST_F_FORK()
/external/linux-kselftest/tools/testing/selftests/seccomp/
Dseccomp_bpf.c3906 int dup_fd, pipe_fds[2]; in TEST() local
3909 ASSERT_GE(pipe(pipe_fds), 0); in TEST()
3911 dup_fd = dup(pipe_fds[0]); in TEST()
3913 EXPECT_NE(pipe_fds[0], dup_fd); in TEST()
3916 ASSERT_EQ(filecmp(self, self, pipe_fds[0], dup_fd), 0); in TEST()

12