/external/libwebsockets/lib/misc/ |
D | spawn.c | 100 if (lsp->pipe_fds[n][!!(n == 0)] == 0) in lws_spawn_piped_destroy() 103 if (lsp->pipe_fds[n][!!(n == 0)] >= 0) { in lws_spawn_piped_destroy() 104 close(lsp->pipe_fds[n][!!(n == 0)]); in lws_spawn_piped_destroy() 105 lsp->pipe_fds[n][!!(n == 0)] = LWS_SOCK_INVALID; in lws_spawn_piped_destroy() 303 lsp->pipe_fds[n][0] = -1; in lws_spawn_piped() 304 lsp->pipe_fds[n][1] = -1; in lws_spawn_piped() 310 if (pipe(lsp->pipe_fds[n]) == -1) in lws_spawn_piped() 328 lsp->stdwsi[n], n, lsp->pipe_fds[n][!!(n == 0)], in lws_spawn_piped() 329 lsp->pipe_fds[n][!(n == 0)]); in lws_spawn_piped() 333 lsp->stdwsi[n]->desc.sockfd = lsp->pipe_fds[n][!!(n == 0)]; in lws_spawn_piped() [all …]
|
/external/ltp/testcases/kernel/syscalls/pwrite/ |
D | pwrite02.c | 33 static int pipe_fds[2]; variable 43 {buf, sizeof(buf), &pipe_fds[1], 0, ESPIPE}, 96 SAFE_PIPE(pipe_fds); in setup() 110 if (pipe_fds[0] > 0) in cleanup() 111 SAFE_CLOSE(pipe_fds[0]); in cleanup() 113 if (pipe_fds[1] > 0) in cleanup() 114 SAFE_CLOSE(pipe_fds[1]); in cleanup()
|
/external/ltp/testcases/kernel/syscalls/fcntl/ |
D | fcntl07.c | 69 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()
|
D | fcntl31.c | 71 static int pipe_fds[2]; variable 112 SAFE_PIPE(cleanup, pipe_fds); in setup() 113 test_fd = pipe_fds[0]; in setup() 314 fd = pipe_fds[1]; in signal_parent() 315 close(pipe_fds[0]); in signal_parent() 385 if (pipe_fds[0] > 0 && close(pipe_fds[0]) == -1) in cleanup() 386 tst_resm(TWARN | TERRNO, "close(%d) failed", pipe_fds[0]); in cleanup() 387 if (pipe_fds[1] > 0 && close(pipe_fds[1]) == -1) in cleanup() 388 tst_resm(TWARN | TERRNO, "close(%d) failed", pipe_fds[1]); in cleanup()
|
D | fcntl30.c | 47 int pipe_fds[2], test_fd; in main() local 58 SAFE_PIPE(cleanup, pipe_fds); in main() 59 test_fd = pipe_fds[1]; in main() 89 SAFE_CLOSE(cleanup, pipe_fds[0]); in main() 90 SAFE_CLOSE(cleanup, pipe_fds[1]); in main()
|
/external/libcap/progs/old/ |
D | sucap.c | 58 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/adhd/cras/src/tests/ |
D | capture_rclient_unittest.cc | 43 int pipe_fds[2]; in TEST() local 47 rc = pipe(pipe_fds); in TEST() 50 rclient = cras_capture_rclient_create(pipe_fds[1], 800); in TEST() 54 rc = read(pipe_fds[0], &msg, sizeof(msg)); in TEST() 60 close(pipe_fds[0]); in TEST() 61 close(pipe_fds[1]); in TEST()
|
D | util_unittest.cc | 268 int pipe_fds[2]; in TEST() local 274 ASSERT_EQ(0, pipe(pipe_fds)); in TEST() 275 poll_fd.fd = pipe_fds[0]; in TEST() 282 write(pipe_fds[1], output.c_str(), output.size() + 1)); in TEST() 285 read(pipe_fds[0], buf, sizeof(buf))); in TEST() 306 EXPECT_EQ(0, close(pipe_fds[0])); in TEST() 307 EXPECT_EQ(0, close(pipe_fds[1])); in TEST()
|
D | playback_rclient_unittest.cc | 45 int pipe_fds[2]; in TEST() local 49 rc = pipe(pipe_fds); in TEST() 52 rclient = cras_playback_rclient_create(pipe_fds[1], 800); in TEST() 56 rc = read(pipe_fds[0], &msg, sizeof(msg)); in TEST() 62 close(pipe_fds[0]); in TEST() 63 close(pipe_fds[1]); in TEST()
|
D | control_rclient_unittest.cc | 112 int pipe_fds[2]; in TEST() local 116 rc = pipe(pipe_fds); in TEST() 119 rclient = cras_control_rclient_create(pipe_fds[1], 800); in TEST() 122 rc = read(pipe_fds[0], &msg, sizeof(msg)); in TEST() 127 close(pipe_fds[0]); in TEST() 128 close(pipe_fds[1]); in TEST()
|
/external/parameter-framework/asio-1.10.6/include/asio/detail/impl/ |
D | pipe_select_interrupter.ipp | 39 int pipe_fds[2]; 40 if (pipe(pipe_fds) == 0) 42 read_descriptor_ = pipe_fds[0]; 44 write_descriptor_ = pipe_fds[1];
|
/external/autotest/client/site_tests/security_Libcontainer/src/ |
D | libcontainer_target_unittest.cc | 33 int pipe_fds[2]; in ScopedCaptureStdout() local 34 CHECK(pipe2(pipe_fds, O_NONBLOCK) != -1); in ScopedCaptureStdout() 35 read_fd_.reset(pipe_fds[0]); in ScopedCaptureStdout() 36 CHECK(dup2(pipe_fds[1], STDOUT_FILENO) != -1); in ScopedCaptureStdout() 37 CHECK(close(pipe_fds[1]) != -1); in ScopedCaptureStdout()
|
/external/linux-kselftest/tools/testing/selftests/pidfd/ |
D | pidfd_test.c | 209 int pipe_fds[2]; in test_pidfd_send_signal_recycled_pid_fail() local 213 ret = pipe2(pipe_fds, O_CLOEXEC); in test_pidfd_send_signal_recycled_pid_fail() 222 close(pipe_fds[1]); in test_pidfd_send_signal_recycled_pid_fail() 223 (void)read(pipe_fds[0], &c, 1); in test_pidfd_send_signal_recycled_pid_fail() 224 close(pipe_fds[0]); in test_pidfd_send_signal_recycled_pid_fail() 233 close(pipe_fds[0]); in test_pidfd_send_signal_recycled_pid_fail() 235 close(pipe_fds[1]); in test_pidfd_send_signal_recycled_pid_fail()
|
/external/tensorflow/tensorflow/core/platform/default/ |
D | subprocess.cc | 178 int pipe_fds[2]; in Start() local 179 if (pipe(pipe_fds) < 0) { in Start() 186 parent_pipe_[i] = pipe_fds[1]; in Start() 187 child_pipe_[i] = pipe_fds[0]; in Start() 189 parent_pipe_[i] = pipe_fds[0]; in Start() 190 child_pipe_[i] = pipe_fds[1]; in Start()
|
/external/llvm-project/compiler-rt/lib/sanitizer_common/tests/ |
D | sanitizer_linux_test.cpp | 259 int pipe_fds[2]; in TEST() local 260 ASSERT_EQ(0, pipe(pipe_fds)); in TEST() 268 /* stdin */ kInvalidFd, /* stdout */ pipe_fds[1]); in TEST() 280 while (ReadFromFile(pipe_fds[0], ptr, 256, &bytes_read)) { in TEST() 290 internal_close(pipe_fds[0]); in TEST()
|
/external/compiler-rt/lib/sanitizer_common/tests/ |
D | sanitizer_linux_test.cc | 267 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/ |
D | libminijail.c | 1952 static void parent_setup_complete(int *pipe_fds) in parent_setup_complete() argument 1954 close_and_reset(&pipe_fds[0]); in parent_setup_complete() 1955 close_and_reset(&pipe_fds[1]); in parent_setup_complete() 1962 static void wait_for_parent_setup(int *pipe_fds) in wait_for_parent_setup() argument 1966 close_and_reset(&pipe_fds[1]); in wait_for_parent_setup() 1969 if (read(pipe_fds[0], &buf, 1) != 0) in wait_for_parent_setup() 1971 close_and_reset(&pipe_fds[0]); in wait_for_parent_setup() 2713 int pipe_fds[2]; member 2725 int *fd_pairs[] = {state->pipe_fds, state->stdin_fds, state->stdout_fds, in minijail_free_run_state() 2982 setup_pipe(&state_out->child_env, state_out->pipe_fds)) in minijail_run_internal() [all …]
|
D | libminijail_unittest.cc | 662 int pipe_fds[2]; in TEST() local 667 ASSERT_EQ(pipe(pipe_fds), 0); in TEST() 674 ASSERT_EQ(read(pipe_fds[0], &pid_in_parent, pid_size), pid_size); in TEST() 679 EXPECT_EQ(write(pipe_fds[1], &mj_fork_ret, pid_size), pid_size); in TEST() 1212 int pipe_fds[2]; in TestCreateSession() local 1225 ASSERT_EQ(pipe(pipe_fds), 0); in TestCreateSession() 1226 minijail_preserve_fd(j.get(), pipe_fds[0], pipe_fds[0]); in TestCreateSession() 1232 ASSERT_EQ(read(pipe_fds[0], &sid_in_parent, pid_size), pid_size); in TestCreateSession() 1240 EXPECT_EQ(write(pipe_fds[1], &parent_sid, pid_size), pid_size); in TestCreateSession()
|
/external/crosvm/sys_util/src/ |
D | lib.rs | 329 let mut pipe_fds = [-1; 2]; in pipe() localVariable 332 let ret = unsafe { pipe2(&mut pipe_fds[0], flags) }; in pipe() 340 File::from_raw_fd(pipe_fds[0]), in pipe() 341 File::from_raw_fd(pipe_fds[1]), in pipe()
|
/external/python/cpython2/Lib/test/ |
D | test_pty.py | 235 pipe_fds = os.pipe() 236 self.fds.extend(pipe_fds) 237 return pipe_fds
|
/external/libchrome/base/process/ |
D | process_util_unittest.cc | 1052 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/cpython3/Lib/test/ |
D | test_pty.py | 255 pipe_fds = os.pipe() 256 self.fds.extend(pipe_fds) 257 return pipe_fds
|
/external/llvm-project/compiler-rt/test/dfsan/ |
D | custom.cpp | 644 int pipe_fds[2]; in test_epoll_wait() local 645 int ret = pipe(pipe_fds); in test_epoll_wait() 653 event.data.fd = pipe_fds[0]; in test_epoll_wait() 654 ret = epoll_ctl(epfd, EPOLL_CTL_ADD, pipe_fds[0], &event); in test_epoll_wait() 668 write(pipe_fds[1], "x", 1); in test_epoll_wait() 672 assert(event.data.fd == pipe_fds[0]); in test_epoll_wait() 678 close(pipe_fds[0]); in test_epoll_wait() 679 close(pipe_fds[1]); in test_epoll_wait()
|
/external/linux-kselftest/tools/testing/selftests/x86/ |
D | protection_keys.c | 1067 int pipe_fds[2]; in test_kernel_gup_of_access_disabled_region() local 1069 pipe_ret = pipe(pipe_fds); in test_kernel_gup_of_access_disabled_region() 1077 vmsplice_ret = vmsplice(pipe_fds[1], &iov, 1, SPLICE_F_GIFT); in test_kernel_gup_of_access_disabled_region() 1081 close(pipe_fds[0]); in test_kernel_gup_of_access_disabled_region() 1082 close(pipe_fds[1]); in test_kernel_gup_of_access_disabled_region()
|
/external/libwebsockets/lib/core-net/ |
D | dummy-callback.c | 800 wsi->http.cgi->lsp->pipe_fds[LWS_STDIN][1] = -1; in lws_callback_http_dummy()
|