/external/ltp/testcases/kernel/syscalls/sendmsg/ |
D | sendmsg02.c | 63 static void client(int id, int pipefd[]) in client() argument 72 close(pipefd[0]); in client() 93 write(pipefd[1], &fd, 1); in client() 98 close(pipefd[1]); in client() 101 static void server(int id, int pipefd[]) in server() argument 106 close(pipefd[1]); in server() 116 read(pipefd[0], &fd, 1); in server() 120 close(pipefd[0]); in server() 125 int i, status, pipefd[2]; in reproduce() local 141 if (pipe(pipefd) < 0) { in reproduce() [all …]
|
/external/strace/tests/ |
D | ioctl_nsfs.c | 98 int *pipefd = (int *) arg; in child() local 99 close(pipefd[1]); in child() 101 if (read(pipefd[0], &pipefd[1], 1)) in child() 116 int pipefd[2]; in test_user_namespace() local 119 if (pipe(pipefd)) in test_user_namespace() 123 CLONE_NEWUSER | CLONE_UNTRACED | SIGCHLD, pipefd); in test_user_namespace() 128 close(pipefd[0]); in test_user_namespace() 130 close(pipefd[1]); in test_user_namespace()
|
D | pipe_maxfd.c | 46 pipe_maxfd(int pipefd[2]) in pipe_maxfd() 58 if (pipe(pipefd)) in pipe_maxfd() 64 move_fd(&pipefd[1], &max_fd); in pipe_maxfd() 66 move_fd(&pipefd[0], &max_fd); in pipe_maxfd()
|
D | attach-f-p.c | 53 typedef int pipefd[2]; typedef 54 static pipefd pipes[N];
|
/external/strace/tests-m32/ |
D | ioctl_nsfs.c | 98 int *pipefd = (int *) arg; in child() local 99 close(pipefd[1]); in child() 101 if (read(pipefd[0], &pipefd[1], 1)) in child() 116 int pipefd[2]; in test_user_namespace() local 119 if (pipe(pipefd)) in test_user_namespace() 123 CLONE_NEWUSER | CLONE_UNTRACED | SIGCHLD, pipefd); in test_user_namespace() 128 close(pipefd[0]); in test_user_namespace() 130 close(pipefd[1]); in test_user_namespace()
|
D | pipe_maxfd.c | 46 pipe_maxfd(int pipefd[2]) in pipe_maxfd() 58 if (pipe(pipefd)) in pipe_maxfd() 64 move_fd(&pipefd[1], &max_fd); in pipe_maxfd() 66 move_fd(&pipefd[0], &max_fd); in pipe_maxfd()
|
D | attach-f-p.c | 53 typedef int pipefd[2]; typedef 54 static pipefd pipes[N];
|
/external/strace/tests-mx32/ |
D | ioctl_nsfs.c | 98 int *pipefd = (int *) arg; in child() local 99 close(pipefd[1]); in child() 101 if (read(pipefd[0], &pipefd[1], 1)) in child() 116 int pipefd[2]; in test_user_namespace() local 119 if (pipe(pipefd)) in test_user_namespace() 123 CLONE_NEWUSER | CLONE_UNTRACED | SIGCHLD, pipefd); in test_user_namespace() 128 close(pipefd[0]); in test_user_namespace() 130 close(pipefd[1]); in test_user_namespace()
|
D | pipe_maxfd.c | 46 pipe_maxfd(int pipefd[2]) in pipe_maxfd() 58 if (pipe(pipefd)) in pipe_maxfd() 64 move_fd(&pipefd[1], &max_fd); in pipe_maxfd() 66 move_fd(&pipefd[0], &max_fd); in pipe_maxfd()
|
D | attach-f-p.c | 53 typedef int pipefd[2]; typedef 54 static pipefd pipes[N];
|
/external/ltp/testcases/kernel/containers/pidns/ |
D | pidns12.c | 50 int pipefd[2]; variable 85 close(pipefd[0]); in child_fn() 97 if (write(pipefd[1], "c:go\0", 5) != 5) { in child_fn() 104 close(pipefd[1]); in child_fn() 132 if (pipe(pipefd) == -1) { in main() 142 close(pipefd[1]); in main() 145 read(pipefd[0], buf, 5); in main() 164 close(pipefd[0]); in main()
|
/external/ltp/testcases/kernel/syscalls/pipe/ |
D | pipe09.c | 80 int pipefd[2]; /* fds for pipe read/write */ in main() local 94 TEST(pipe(pipefd)); in main() 106 if (close(pipefd[0]) != 0) { in main() 113 if (write(pipefd[1], "A", 1) != 1) { in main() 133 if (close(pipefd[0]) != 0) { in main() 139 if (write(pipefd[1], "B", 1) != 1) { in main() 155 if (close(pipefd[1]) != 0) { in main() 160 while ((red = do_read(pipefd[0], rebuf, 100)) > 0) { in main()
|
D | pipe08.c | 67 int pipefd[2]; /* fds for pipe read/write */ in main() local 81 TEST(pipe(pipefd)); in main() 88 if ((close_stat = close(pipefd[0])) == -1) { in main() 100 written = write(pipefd[1], wrbuf, length); in main()
|
/external/libusb/libusb/os/ |
D | poll_posix.c | 30 int usbi_pipe(int pipefd[2]) in usbi_pipe() 32 int ret = pipe(pipefd); in usbi_pipe() 36 ret = fcntl(pipefd[1], F_GETFL); in usbi_pipe() 41 ret = fcntl(pipefd[1], F_SETFL, ret | O_NONBLOCK); in usbi_pipe() 50 usbi_close(pipefd[0]); in usbi_pipe() 51 usbi_close(pipefd[1]); in usbi_pipe()
|
/external/wayland/tests/ |
D | test-runner.c | 288 int pipefd[2]; in is_debugger_attached() local 290 if (pipe(pipefd) == -1) { in is_debugger_attached() 298 close(pipefd[0]); in is_debugger_attached() 299 close(pipefd[1]); in is_debugger_attached() 306 close(pipefd[1]); /* Close unused write end */ in is_debugger_attached() 307 read(pipefd[0], &buf, 1); in is_debugger_attached() 308 close(pipefd[0]); in is_debugger_attached() 319 close(pipefd[0]); in is_debugger_attached() 330 write(pipefd[1], "-", 1); in is_debugger_attached() 333 write(pipefd[1], "+", 1); in is_debugger_attached() [all …]
|
/external/ltp/testcases/kernel/syscalls/setrlimit/ |
D | setrlimit01.c | 126 int pipefd[2]; in test2() local 128 SAFE_PIPE(NULL, pipefd); in test2() 142 close(pipefd[0]); /* close unused read end */ in test2() 154 if (write(pipefd[1], &bytes, sizeof(bytes)) in test2() 158 close(pipefd[1]); /* EOF */ in test2() 179 close(pipefd[1]); /* close unused write end */ in test2() 180 if (read(pipefd[0], &bytes, sizeof(bytes)) < sizeof(bytes)) in test2() 183 close(pipefd[0]); in test2()
|
/external/google-breakpad/src/client/linux/minidump_writer/ |
D | linux_dumper_unittest_helper.cc | 59 int pipefd = *static_cast<int *>(data); in thread_function() local 63 if (write(pipefd, &byte, sizeof(byte)) != sizeof(byte)) { in thread_function() 79 int pipefd = atoi(argv[1]); in main() local 90 pthread_create(&threads[i], &thread_attributes, &thread_function, &pipefd); in main() 92 thread_function(&pipefd); in main()
|
/external/adhd/cras/src/tests/ |
D | cras_router.c | 26 static int pipefd[2]; variable 32 return write(pipefd[1], "1", 1); in terminate_stream_loop() 134 if (pipe(pipefd) == -1) { in run_file_io_stream() 184 FD_SET(pipefd[0], &poll_set); in run_file_io_stream() 185 pselect(pipefd[0] + 1, &poll_set, NULL, NULL, NULL, NULL); in run_file_io_stream() 191 close(pipefd[0]); in run_file_io_stream() 192 close(pipefd[1]); in run_file_io_stream()
|
/external/dnsmasq/src/ |
D | helper.c | 56 int i, pipefd[2]; in create_helper() local 61 if (pipe(pipefd) == -1 || !fix_fd(pipefd[1]) || (pid = fork()) == -1) in create_helper() 69 close(pipefd[0]); /* close reader side */ in create_helper() 70 return pipefd[1]; in create_helper() 106 max_fd != STDIN_FILENO && max_fd != pipefd[0] && max_fd != event_fd) in create_helper() 118 if (!read_write(pipefd[0], (unsigned char *)&data, sizeof(data), 1)) in create_helper() 142 if (!read_write(pipefd[0], buf, data.clid_len, 1)) in create_helper() 158 if (!read_write(pipefd[0], buf, in create_helper() 275 close(pipefd[0]); in create_helper()
|
/external/toybox/toys/pending/ |
D | tar.c | 288 int pipefd[2]; in compress_stream() local 291 xpipe(pipefd); in compress_stream() 299 xclose(pipefd[1]); /* Close unused write*/ in compress_stream() 300 dup2(pipefd[0], 0); in compress_stream() 304 xclose(pipefd[0]); /* Close unused read end */ in compress_stream() 305 dup2(pipefd[1], tar_hdl->src_fd); //write to pipe in compress_stream() 319 int pipefd[2], status = 0; in extract_to_command() local 323 xpipe(pipefd); in extract_to_command() 347 xclose(pipefd[1]); // Close unused write in extract_to_command() 348 dup2(pipefd[0], 0); in extract_to_command() [all …]
|
/external/linux-kselftest/tools/testing/selftests/kcmp/ |
D | kcmp_test.c | 36 int pipefd[2]; in main() local 50 if (pipe(pipefd)) { in main() 64 if (epoll_ctl(epollfd, EPOLL_CTL_ADD, pipefd[0], &ev)) { in main() 69 fddup = dup2(pipefd[1], duped_num); in main() 143 ret = sys_kcmp(pid1, pid1, KCMP_EPOLL_TFD, pipefd[1], in main()
|
/external/squashfs-tools/squashfs-tools/ |
D | pseudo.c | 221 int res, pipefd[2]; in pseudo_exec_file() local 223 res = pipe(pipefd); in pseudo_exec_file() 236 close(pipefd[0]); in pseudo_exec_file() 238 res = dup(pipefd[1]); in pseudo_exec_file() 246 close(pipefd[1]); in pseudo_exec_file() 247 return pipefd[0]; in pseudo_exec_file() 250 close(pipefd[0]); in pseudo_exec_file() 251 close(pipefd[1]); in pseudo_exec_file()
|
/external/ltp/testcases/kernel/logging/kmsg/ |
D | kmsg01.c | 195 int pipefd[2]; in timed_read_kmsg() local 198 if (pipe(pipefd) != 0) in timed_read_kmsg() 208 close(pipefd[0]); in timed_read_kmsg() 210 if (write(pipefd[1], "", 1) == -1) in timed_read_kmsg() 221 close(pipefd[1]); in timed_read_kmsg() 224 SAFE_CLOSE(pipefd[1]); in timed_read_kmsg() 228 TEST(timed_read(pipefd[0], timeout_usec)); in timed_read_kmsg() 230 SAFE_CLOSE(pipefd[0]); in timed_read_kmsg()
|
/external/ppp/pppd/ |
D | main.c | 798 int pipefd[2]; in detach() local 802 if (pipe(pipefd) == -1) in detach() 803 pipefd[0] = pipefd[1] = -1; in detach() 830 close(pipefd[1]); in detach() 831 complete_read(pipefd[0], numbuf, 1); in detach() 832 close(pipefd[0]); in detach() 1591 int fd, pipefd[2]; in safe_fork() local 1602 if (pipe(pipefd) == -1) in safe_fork() 1603 pipefd[0] = pipefd[1] = -1; in safe_fork() 1611 close(pipefd[1]); in safe_fork() [all …]
|
/external/libchrome/base/ |
D | logging_unittest.cc | 317 int pipefd[2]; in SpawnChildAndCrash() local 318 ASSERT_EQ(0, pipe(pipefd)); in SpawnChildAndCrash() 324 close(pipefd[0]); // Close reader (parent) end. in SpawnChildAndCrash() 325 g_child_crash_pipe = pipefd[1]; in SpawnChildAndCrash() 330 close(pipefd[1]); // Close writer (child) end. in SpawnChildAndCrash() 332 int res = HANDLE_EINTR(read(pipefd[0], child_crash_addr, sizeof(uintptr_t))); in SpawnChildAndCrash()
|