/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-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/ |
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()
|
/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()
|
/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/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/oss-fuzz/projects/ibmswtpm2/ |
D | fuzzer.cc | 27 int pipefd[2]; in LLVMFuzzerTestOneInput() local 33 if (pipe(pipefd) == -1) { in LLVMFuzzerTestOneInput() 38 if (write(pipefd[1], Data, Size) != (ssize_t)Size) { in LLVMFuzzerTestOneInput() 43 close(pipefd[1]); in LLVMFuzzerTestOneInput() 73 TpmServer(pipefd[0]); in LLVMFuzzerTestOneInput() 75 close(pipefd[0]); in LLVMFuzzerTestOneInput()
|
/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/wayland/tests/ |
D | test-runner.c | 235 int pipefd[2]; in is_debugger_attached() local 237 if (pipe(pipefd) == -1) { in is_debugger_attached() 245 close(pipefd[0]); in is_debugger_attached() 246 close(pipefd[1]); in is_debugger_attached() 253 close(pipefd[1]); /* Close unused write end */ in is_debugger_attached() 254 read(pipefd[0], &buf, 1); in is_debugger_attached() 255 close(pipefd[0]); in is_debugger_attached() 266 close(pipefd[0]); in is_debugger_attached() 277 write(pipefd[1], "-", 1); in is_debugger_attached() 280 write(pipefd[1], "+", 1); in is_debugger_attached() [all …]
|
/external/grpc-grpc/src/core/lib/iomgr/ |
D | wakeup_fd_pipe.cc | 37 int pipefd[2]; in pipe_init() local 38 int r = pipe(pipefd); in pipe_init() 44 err = grpc_set_socket_nonblocking(pipefd[0], 1); in pipe_init() 46 err = grpc_set_socket_nonblocking(pipefd[1], 1); in pipe_init() 48 fd_info->read_fd = pipefd[0]; in pipe_init() 49 fd_info->write_fd = pipefd[1]; in pipe_init()
|
/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/tools/cras_router/ |
D | cras_router.c | 26 static int pipefd[2]; variable 32 return write(pipefd[1], "1", 1); in terminate_stream_loop() 119 if (pipe(pipefd) == -1) { in run_file_io_stream() 159 FD_SET(pipefd[0], &poll_set); in run_file_io_stream() 160 pselect(pipefd[0] + 1, &poll_set, NULL, NULL, NULL, NULL); in run_file_io_stream() 166 close(pipefd[0]); in run_file_io_stream() 167 close(pipefd[1]); in run_file_io_stream()
|
/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/ltp/testcases/kernel/syscalls/write/ |
D | write05.c | 32 static int pipefd[2]; variable 42 {&pipefd[1], &buf, sizeof(buf), EPIPE}, 88 SAFE_PIPE(pipefd); in setup() 89 SAFE_CLOSE(pipefd[0]); in setup()
|
/external/dnsmasq/src/ |
D | helper.c | 54 int i, pipefd[2]; in create_helper() local 59 if (pipe(pipefd) == -1 || !fix_fd(pipefd[1]) || (pid = fork()) == -1) { in create_helper() 65 close(pipefd[0]); /* close reader side */ in create_helper() 66 return pipefd[1]; in create_helper() 96 max_fd != pipefd[0] && max_fd != event_fd) in create_helper() 107 if (!read_write(pipefd[0], (unsigned char*) &data, sizeof(data), 1)) _exit(0); in create_helper() 128 if (!read_write(pipefd[0], buf, data.clid_len, 1)) continue; in create_helper() 141 if (!read_write(pipefd[0], buf, in create_helper() 238 close(pipefd[0]); in create_helper()
|
/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 | 176 int pipefd[2]; in timed_read_kmsg() local 179 if (pipe(pipefd) != 0) in timed_read_kmsg() 189 close(pipefd[0]); in timed_read_kmsg() 191 if (write(pipefd[1], "", 1) == -1) in timed_read_kmsg() 202 close(pipefd[1]); in timed_read_kmsg() 205 SAFE_CLOSE(pipefd[1]); in timed_read_kmsg() 209 TEST(timed_read(pipefd[0], timeout_usec)); in timed_read_kmsg() 211 SAFE_CLOSE(pipefd[0]); in timed_read_kmsg()
|
/external/ppp/pppd/ |
D | main.c | 775 int pipefd[2]; in detach() local 779 if (pipe(pipefd) == -1) in detach() 780 pipefd[0] = pipefd[1] = -1; in detach() 807 close(pipefd[1]); in detach() 808 complete_read(pipefd[0], numbuf, 1); in detach() 809 close(pipefd[0]); in detach() 1568 int fd, pipefd[2]; in safe_fork() local 1579 if (pipe(pipefd) == -1) in safe_fork() 1580 pipefd[0] = pipefd[1] = -1; in safe_fork() 1588 close(pipefd[1]); in safe_fork() [all …]
|
/external/toybox/toys/posix/ |
D | tar.c | 860 int pipefd[2] = {hdr ? -1 : TT.fd, -1}, i, pid; in tar_main() local 866 (char *[]){archiver, "-dc", 0}, pipefd); in tar_main() 872 TT.fd = pipefd[1]; in tar_main() 881 dup2(pipefd[0], 0); in tar_main() 882 if (pipefd[0]) close(pipefd[0]); in tar_main() 886 pipefd[0] = pipefd[1]; in tar_main() 887 pipefd[1] = 1; in tar_main() 888 pid = xpopen_both(0, pipefd); in tar_main() 889 close(pipefd[1]); in tar_main() 934 int pipefd[2] = {-1, TT.fd}; in tar_main() local [all …]
|