Home
last modified time | relevance | path

Searched refs:pipefd (Results 1 – 25 of 58) sorted by relevance

123

/external/ltp/testcases/kernel/syscalls/sendmsg/
Dsendmsg02.c63 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/
Dioctl_nsfs.c98 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()
Dpipe_maxfd.c46 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/
Dioctl_nsfs.c98 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()
Dpipe_maxfd.c46 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/
Dioctl_nsfs.c98 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()
Dpipe_maxfd.c46 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/ltp/testcases/kernel/containers/pidns/
Dpidns12.c50 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/libusb/libusb/os/
Dpoll_posix.c30 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/syscalls/pipe/
Dpipe09.c80 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()
Dpipe08.c67 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/grpc-grpc/src/core/lib/iomgr/
Dwakeup_fd_pipe.cc37 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/wayland/tests/
Dtest-runner.c288 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/
Dsetrlimit01.c126 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/
Dlinux_dumper_unittest_helper.cc59 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/
Dcras_router.c26 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/linux-kselftest/tools/testing/selftests/kcmp/
Dkcmp_test.c36 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/dnsmasq/src/
Dhelper.c54 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/ltp/testcases/kernel/syscalls/write/
Dwrite05.c45 static int pipefd[2]; variable
55 {&pipefd[1], &buf, sizeof(buf), EPIPE},
101 SAFE_PIPE(pipefd); in setup()
102 SAFE_CLOSE(pipefd[0]); in setup()
/external/squashfs-tools/squashfs-tools/
Dpseudo.c221 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/toybox/toys/pending/
Dtar.c288 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/ltp/testcases/kernel/logging/kmsg/
Dkmsg01.c195 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/
Dmain.c775 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/u-boot/scripts/
Ddocproc.c361 int pipefd[2]; in find_all_symbols() local
370 if (pipe(pipefd)) { in find_all_symbols()
380 close(pipefd[0]); in find_all_symbols()
381 dup2(pipefd[1], 1); in find_all_symbols()
391 close(pipefd[1]); in find_all_symbols()
394 while ((ret = read(pipefd[0], in find_all_symbols()
/external/syzkaller/sys/netbsd/
Dfs.txt30 pipe2(pipefd ptr[out, pipefd], flags flags[pipe_flags])
32 pipefd {

123