Home
last modified time | relevance | path

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

/external/ltp/testcases/kernel/syscalls/pwrite/
Dpwrite02.c33 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/
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.c71 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()
Dfcntl30.c47 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/
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/libdaemon/libdaemon/
Ddfork.c138 int pipe_fds[2] = {-1, -1}; in daemon_fork() local
172 if (pipe(pipe_fds) < 0) { in daemon_fork()
187 close(pipe_fds[0]); in daemon_fork()
188 close(pipe_fds[1]); in daemon_fork()
205 if (close(pipe_fds[0]) < 0) { in daemon_fork()
211 if (move_fd_up(&pipe_fds[1]) < 0) in daemon_fork()
288 if (atomic_write(pipe_fds[1], &dpid, sizeof(dpid)) != sizeof(dpid)) { in daemon_fork()
293 if (close(pipe_fds[1]) < 0) { in daemon_fork()
302 close(pipe_fds[1]); in daemon_fork()
309 if (atomic_write(pipe_fds[1], &dpid, sizeof(dpid)) != sizeof(dpid)) in daemon_fork()
[all …]
/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/autotest/client/site_tests/security_Libcontainer/src/
Dlibcontainer_target_unittest.cc32 int pipe_fds[2]; in ScopedCaptureStdout() local
33 CHECK(pipe2(pipe_fds, O_NONBLOCK) != -1); in ScopedCaptureStdout()
34 read_fd_.reset(pipe_fds[0]); in ScopedCaptureStdout()
35 CHECK(dup2(pipe_fds[1], STDOUT_FILENO) != -1); in ScopedCaptureStdout()
36 CHECK(close(pipe_fds[1]) != -1); in ScopedCaptureStdout()
/external/adhd/cras/src/tests/
Dutil_unittest.cc268 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()
Dcapture_rclient_unittest.cc47 int pipe_fds[2]; in TEST() local
51 rc = pipe(pipe_fds); in TEST()
54 rclient = cras_capture_rclient_create(pipe_fds[1], 800); in TEST()
58 rc = read(pipe_fds[0], &msg, sizeof(msg)); in TEST()
64 close(pipe_fds[0]); in TEST()
65 close(pipe_fds[1]); in TEST()
Dplayback_rclient_unittest.cc47 int pipe_fds[2]; in TEST() local
51 rc = pipe(pipe_fds); in TEST()
54 rclient = cras_playback_rclient_create(pipe_fds[1], 800); in TEST()
58 rc = read(pipe_fds[0], &msg, sizeof(msg)); in TEST()
64 close(pipe_fds[0]); in TEST()
65 close(pipe_fds[1]); in TEST()
Dcontrol_rclient_unittest.cc113 int pipe_fds[2]; in TEST() local
117 rc = pipe(pipe_fds); in TEST()
120 rclient = cras_control_rclient_create(pipe_fds[1], 800); in TEST()
123 rc = read(pipe_fds[0], &msg, sizeof(msg)); in TEST()
128 close(pipe_fds[0]); in TEST()
129 close(pipe_fds[1]); in TEST()
/external/linux-kselftest/tools/testing/selftests/pidfd/
Dpidfd_test.c209 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/
Dsubprocess.cc174 int pipe_fds[2]; in Start() local
175 if (pipe(pipe_fds) < 0) { in Start()
182 parent_pipe_[i] = pipe_fds[1]; in Start()
183 child_pipe_[i] = pipe_fds[0]; in Start()
185 parent_pipe_[i] = pipe_fds[0]; in Start()
186 child_pipe_[i] = pipe_fds[1]; in Start()
/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/crosvm/sys_util/src/
Dlib.rs267 let mut pipe_fds = [-1; 2]; in pipe() localVariable
270 let ret = unsafe { pipe2(&mut pipe_fds[0], flags) }; in pipe()
278 File::from_raw_fd(pipe_fds[0]), in pipe()
279 File::from_raw_fd(pipe_fds[1]), in pipe()
/external/minijail/
Dlibminijail.c1863 static void parent_setup_complete(int *pipe_fds) in parent_setup_complete() argument
1865 close_and_reset(&pipe_fds[0]); in parent_setup_complete()
1866 close_and_reset(&pipe_fds[1]); in parent_setup_complete()
1873 static void wait_for_parent_setup(int *pipe_fds) in wait_for_parent_setup() argument
1877 close_and_reset(&pipe_fds[1]); in wait_for_parent_setup()
1880 if (read(pipe_fds[0], &buf, 1) != 0) in wait_for_parent_setup()
1882 close_and_reset(&pipe_fds[0]); in wait_for_parent_setup()
2502 int pipe_fds[2]; member
2514 int *fd_pairs[] = {state->pipe_fds, state->stdin_fds, state->stdout_fds, in minijail_free_run_state()
2771 setup_pipe(&state_out->child_env, state_out->pipe_fds)) in minijail_run_internal()
[all …]
Dlibminijail_unittest.cc564 int pipe_fds[2]; in TEST() local
569 ASSERT_EQ(pipe(pipe_fds), 0); in TEST()
576 ASSERT_EQ(read(pipe_fds[0], &pid_in_parent, pid_size), pid_size); in TEST()
581 EXPECT_EQ(write(pipe_fds[1], &mj_fork_ret, pid_size), pid_size); in TEST()
1020 int pipe_fds[2]; in TestCreateSession() local
1033 ASSERT_EQ(pipe(pipe_fds), 0); in TestCreateSession()
1034 minijail_preserve_fd(j.get(), pipe_fds[0], pipe_fds[0]); in TestCreateSession()
1040 ASSERT_EQ(read(pipe_fds[0], &sid_in_parent, pid_size), pid_size); in TestCreateSession()
1048 EXPECT_EQ(write(pipe_fds[1], &parent_sid, pid_size), pid_size); in TestCreateSession()
/external/python/cpython2/Lib/test/
Dtest_pty.py235 pipe_fds = os.pipe()
236 self.fds.extend(pipe_fds)
237 return pipe_fds
/external/python/cpython3/Lib/test/
Dtest_pty.py255 pipe_fds = os.pipe()
256 self.fds.extend(pipe_fds)
257 return pipe_fds
/external/linux-kselftest/tools/testing/selftests/x86/
Dprotection_keys.c1067 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/linux-kselftest/tools/testing/selftests/seccomp/
Dseccomp_bpf.c3573 int dup_fd, pipe_fds[2];
3576 ret = pipe(pipe_fds);
3580 dup_fd = dup(pipe_fds[0]);
3586 ret = filecmp(self, self, pipe_fds[0], dup_fd);