/external/libchrome/sandbox/linux/services/ |
D | scoped_process_unittest.cc | 75 int pipe_fds[2]; in TEST() local 76 ASSERT_EQ(0, pipe(pipe_fds)); in TEST() 77 base::ScopedFD read_end_closer(pipe_fds[0]); in TEST() 78 base::ScopedFD write_end_closer(pipe_fds[1]); in TEST() 84 pipe_fds[1] = -1; in TEST() 86 ASSERT_EQ(0, fcntl(pipe_fds[0], F_SETFL, O_NONBLOCK)); in TEST() 90 ASSERT_EQ(0, read(pipe_fds[0], &c, 1)); in TEST() 110 int pipe_fds[2]; in TEST() local 111 ASSERT_EQ(0, pipe(pipe_fds)); in TEST() 112 base::ScopedFD read_end_closer(pipe_fds[0]); in TEST() [all …]
|
/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/libdaemon/libdaemon/ |
D | dfork.c | 138 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/ltp/testcases/kernel/syscalls/pwrite/ |
D | pwrite02.c | 147 int pipe_fds[2]; in test_espipe() local 149 SAFE_PIPE(cleanup, pipe_fds); in test_espipe() 151 TEST(pwrite(pipe_fds[1], write_buf, K1, 0)); in test_espipe() 155 SAFE_CLOSE(cleanup, pipe_fds[0]); in test_espipe() 156 SAFE_CLOSE(cleanup, pipe_fds[1]); in test_espipe()
|
/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/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/python/cpython2/Lib/test/ |
D | test_pty.py | 221 pipe_fds = os.pipe() 222 self.fds.extend(pipe_fds) 223 return pipe_fds
|
/external/minijail/ |
D | libminijail.c | 1388 static void parent_setup_complete(int *pipe_fds) in parent_setup_complete() argument 1390 close(pipe_fds[0]); in parent_setup_complete() 1391 close(pipe_fds[1]); in parent_setup_complete() 1398 static void wait_for_parent_setup(int *pipe_fds) in wait_for_parent_setup() argument 1402 close(pipe_fds[1]); in wait_for_parent_setup() 1405 if (read(pipe_fds[0], &buf, 1) != 0) in wait_for_parent_setup() 1407 close(pipe_fds[0]); in wait_for_parent_setup() 1997 int pipe_fds[2]; in minijail_run_internal() local 2050 if (setup_pipe(pipe_fds)) in minijail_run_internal() 2185 close(pipe_fds[0]); /* read endpoint */ in minijail_run_internal() [all …]
|
/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()
|