/third_party/pulseaudio/src/pulsecore/ |
D | lock-autospawn.c | 60 static int pipe_fd[2] = { -1, -1 }; variable 75 pa_assert(pipe_fd[0] >= 0); in ref() 76 pa_assert(pipe_fd[1] >= 0); in ref() 88 pa_assert(pipe_fd[0] < 0); in ref() 89 pa_assert(pipe_fd[1] < 0); in ref() 91 if (pa_pipe_cloexec(pipe_fd) < 0) in ref() 94 pa_make_fd_nonblock(pipe_fd[1]); in ref() 95 pa_make_fd_nonblock(pipe_fd[0]); in ref() 106 pa_assert(pipe_fd[0] >= 0); in unref() 107 pa_assert(pipe_fd[1] >= 0); in unref() [all …]
|
/third_party/ltp/testcases/kernel/containers/pidns/ |
D | pidns13.c | 36 static int pipe_fd[2]; variable 63 SAFE_CLOSE(pipe_fd[1]); in child_fn() 69 SAFE_FCNTL(pipe_fd[0], F_SETOWN, pid); in child_fn() 70 SAFE_FCNTL(pipe_fd[0], F_SETSIG, SIGUSR1); in child_fn() 71 flags = SAFE_FCNTL(pipe_fd[0], F_GETFL); in child_fn() 72 SAFE_FCNTL(pipe_fd[0], F_SETFL, flags | O_ASYNC); in child_fn() 89 if (info.si_fd == pipe_fd[0] && info.si_code == POLL_IN) in child_fn() 96 SAFE_CLOSE(pipe_fd[0]); in child_fn() 99 SAFE_WRITE(pipe_fd[1], 1, "test\n", 5); in child_fn() 109 SAFE_PIPE(pipe_fd); in run() [all …]
|
/third_party/gstreamer/gstreamer/tests/check/elements/ |
D | fdsrc.c | 80 gint pipe_fd[2]; in GST_START_TEST() local 84 fail_if (pipe (pipe_fd) < 0); in GST_START_TEST() 86 fail_if (_pipe (pipe_fd, 2048, _O_BINARY) < 0); in GST_START_TEST() 91 g_object_set (G_OBJECT (src), "fd", pipe_fd[0], NULL); in GST_START_TEST() 100 flags = fcntl (pipe_fd[1], F_GETFL, 0); in GST_START_TEST() 101 fcntl (pipe_fd[1], F_SETFL, flags | O_NONBLOCK); in GST_START_TEST() 107 int ret = write (pipe_fd[1], data, 4096); in GST_START_TEST() 118 close (pipe_fd[0]); in GST_START_TEST() 119 close (pipe_fd[1]); in GST_START_TEST() 130 gint pipe_fd[2]; in GST_START_TEST() local [all …]
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/mmap/ |
D | 23-1.c | 31 int pipe_fd[2]; in main() local 34 if (pipe(pipe_fd) == -1) { in main() 39 pa = mmap(NULL, 1024, PROT_READ, MAP_SHARED, pipe_fd[0], 0); in main() 43 close(pipe_fd[0]); in main() 44 close(pipe_fd[1]); in main() 55 close(pipe_fd[0]); in main() 56 close(pipe_fd[1]); in main()
|
/third_party/ltp/testcases/kernel/syscalls/cma/ |
D | process_vm_readv02.c | 39 static int pipe_fd[2]; variable 58 SAFE_PIPE(cleanup, pipe_fd); in main() 108 SAFE_CLOSE(tst_exit, pipe_fd[0]); in child_alloc() 110 SAFE_WRITE(tst_exit, 1, pipe_fd[1], buf, strlen(buf) + 1); in child_alloc() 111 SAFE_CLOSE(tst_exit, pipe_fd[1]); in child_alloc() 124 SAFE_CLOSE(tst_exit, pipe_fd[1]); in child_invoke() 125 SAFE_READ(tst_exit, 0, pipe_fd[0], buf, BUFSIZ); in child_invoke() 126 SAFE_CLOSE(tst_exit, pipe_fd[0]); in child_invoke()
|
D | process_vm_writev02.c | 49 static int pipe_fd[2]; variable 68 SAFE_PIPE(cleanup, pipe_fd); in main() 122 SAFE_CLOSE(tst_exit, pipe_fd[0]); in child_init_and_verify() 124 SAFE_WRITE(tst_exit, 1, pipe_fd[1], buf, strlen(buf) + 1); in child_init_and_verify() 125 SAFE_CLOSE(tst_exit, pipe_fd[1]); in child_init_and_verify() 155 SAFE_CLOSE(tst_exit, pipe_fd[1]); in child_write() 156 SAFE_READ(tst_exit, 0, pipe_fd[0], buf, bufsz); in child_write() 157 SAFE_CLOSE(tst_exit, pipe_fd[0]); in child_write()
|
D | process_vm_readv03.c | 52 static int pipe_fd[2]; variable 74 SAFE_PIPE(cleanup, pipe_fd); in main() 153 SAFE_CLOSE(tst_exit, pipe_fd[0]); in child_alloc() 155 SAFE_WRITE(tst_exit, 1, pipe_fd[1], buf, strlen(buf) + 1); in child_alloc() 156 SAFE_CLOSE(tst_exit, pipe_fd[1]); in child_alloc() 170 SAFE_CLOSE(tst_exit, pipe_fd[1]); in fetch_remote_addrs() 171 SAFE_READ(tst_exit, 0, pipe_fd[0], buf, BUFSIZ); in fetch_remote_addrs() 172 SAFE_CLOSE(tst_exit, pipe_fd[0]); in fetch_remote_addrs()
|
/third_party/ltp/testcases/kernel/syscalls/splice/ |
D | splice02.c | 42 static int pipe_fd[2]; variable 62 SAFE_CLOSE(pipe_fd[1]); in do_child() 63 SAFE_DUP2(pipe_fd[0], STDIN_FILENO); in do_child() 123 SAFE_PIPE(pipe_fd); in run() 126 max_pipe_size = SAFE_FCNTL(pipe_fd[1], F_GETPIPE_SZ); in run() 143 written = SAFE_WRITE(1, pipe_fd[1], &buf, size); in run() 147 SAFE_CLOSE(pipe_fd[0]); in run() 148 SAFE_CLOSE(pipe_fd[1]); in run()
|
/third_party/ltp/testcases/kernel/syscalls/fsync/ |
D | fsync03.c | 24 static int pipe_fd[2]; variable 32 {&pipe_fd[1], EINVAL}, 36 {&pipe_fd[0], EBADF}, 46 SAFE_PIPE(pipe_fd); in setup() 56 SAFE_CLOSE(pipe_fd[0]); in setup() 79 SAFE_CLOSE(pipe_fd[1]); in cleanup()
|
/third_party/ltp/testcases/kernel/syscalls/pread/ |
D | pread02.c | 25 static int pipe_fd[2], fd, dir_fd; variable 34 {&pipe_fd[0], K1, 0, "file descriptor is a PIPE or FIFO", ESPIPE}, 50 SAFE_PIPE(pipe_fd); in setup() 51 SAFE_WRITE(1, pipe_fd[1], "x", 1); in setup() 64 if (pipe_fd[i] > 0) in cleanup() 65 SAFE_CLOSE(pipe_fd[i]); in cleanup()
|
/third_party/ltp/testcases/kernel/syscalls/fstatfs/ |
D | fstatfs01.c | 57 static int pipe_fd; variable 64 {&pipe_fd, "fstatfs() on a pipe"}, 110 pipe_fd = pipe[0]; in setup() 119 if (pipe_fd > 0 && close(pipe_fd)) in cleanup()
|
/third_party/ltp/testcases/kernel/syscalls/sigrelse/ |
D | sigrelse01.c | 165 static int pipe_fd[2]; /* file descriptors for pipe parent read */ variable 196 maybe_run_child(&child, "dd", &pipe_fd[1], &pipe_fd2[0]); in main() 219 if (self_exec(argv[0], "dd", pipe_fd[1], pipe_fd2[0]) < in main() 252 if ((str = read_pipe(pipe_fd[0])) == NULL) { in parent() 309 if ((array = (int *)read_pipe(pipe_fd[0])) == NULL) { in parent() 345 if ((str = read_pipe(pipe_fd[0])) == NULL) { in parent() 426 if (write_pipe(pipe_fd[1], note) < 0) { in child() 508 if (write_pipe(pipe_fd[1], note) < 0) { in child() 769 SAFE_PIPE(cleanup, pipe_fd); in setup() 775 if (fcntl(pipe_fd[0], F_SETFL, O_NONBLOCK) == -1) in setup()
|
/third_party/ltp/testcases/kernel/syscalls/writev/ |
D | writev01.c | 23 static int pipe_fd[2]; variable 92 .pfd = &(pipe_fd[1]), 110 SAFE_PIPE(pipe_fd); in setup() 111 SAFE_CLOSE(pipe_fd[0]); in setup()
|
/third_party/ltp/testcases/kernel/security/tomoyo/ |
D | tomoyo_file_test.c | 92 int pipe_fd[2] = { EOF, EOF }; in stage_file_test() local 96 if (pipe(pipe_fd) == -1) in stage_file_test() 100 if (write(pipe_fd[1], &errno, sizeof(errno)) == -1) in stage_file_test() 104 close(pipe_fd[1]); in stage_file_test() 105 (void)read(pipe_fd[0], &error, sizeof(error)); in stage_file_test()
|
D | tomoyo_new_file_test.c | 94 int pipe_fd[2] = { EOF, EOF }; in stage_file_test() local 156 if (pipe(pipe_fd) == -1) in stage_file_test() 160 if (write(pipe_fd[1], &errno, sizeof(errno)) == -1) in stage_file_test() 164 close(pipe_fd[1]); in stage_file_test() 165 (void)read(pipe_fd[0], &error, sizeof(error)); in stage_file_test() 166 close(pipe_fd[0]); in stage_file_test() 173 if (pipe(pipe_fd) == -1) in stage_file_test() 177 if (write(pipe_fd[1], &errno, sizeof(errno)) == -1) in stage_file_test() 181 close(pipe_fd[1]); in stage_file_test() 182 (void)read(pipe_fd[0], &error, sizeof(error)); in stage_file_test() [all …]
|
D | tomoyo_new_test.c | 102 int pipe_fd[2] = { EOF, EOF }; in test_execute_bin_true() local 103 if (pipe(pipe_fd) == -1) in test_execute_bin_true() 109 if (write(pipe_fd[1], &error, sizeof(error)) == -1) in test_execute_bin_true() 117 close(pipe_fd[1]); in test_execute_bin_true() 118 (void)read(pipe_fd[0], &error, sizeof(error)); in test_execute_bin_true() 119 close(pipe_fd[0]); in test_execute_bin_true()
|
/third_party/weston/tools/zunitc/src/ |
D | zuc_collector.h | 45 zuc_collector_create(int *pipe_fd); 56 zuc_process_message(struct zuc_test *test, int pipe_fd);
|
D | zuc_collector.c | 156 zuc_collector_create(int *pipe_fd) in zuc_collector_create() argument 162 ((struct collector_data *)listener->data)->fd = pipe_fd; in zuc_collector_create()
|
/third_party/mesa3d/src/gtest/src/ |
D | gtest-death-test.cc | 1125 int pipe_fd[2]; in AssumeRole() local 1126 GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1); in AssumeRole() 1143 GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[0])); in AssumeRole() 1144 set_write_fd(pipe_fd[1]); in AssumeRole() 1155 GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1])); in AssumeRole() 1156 set_read_fd(pipe_fd[0]); in AssumeRole() 1425 int pipe_fd[2]; in AssumeRole() local 1426 GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1); in AssumeRole() 1429 GTEST_DEATH_TEST_CHECK_(fcntl(pipe_fd[1], F_SETFD, 0) != -1); in AssumeRole() 1438 + StreamableToString(pipe_fd[1]); in AssumeRole() [all …]
|
/third_party/googletest/googletest/src/ |
D | gtest-death-test.cc | 1124 int pipe_fd[2]; in AssumeRole() local 1125 GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1); in AssumeRole() 1142 GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[0])); in AssumeRole() 1143 set_write_fd(pipe_fd[1]); in AssumeRole() 1154 GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1])); in AssumeRole() 1155 set_read_fd(pipe_fd[0]); in AssumeRole() 1416 int pipe_fd[2]; in AssumeRole() local 1417 GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1); in AssumeRole() 1420 GTEST_DEATH_TEST_CHECK_(fcntl(pipe_fd[1], F_SETFD, 0) != -1); in AssumeRole() 1429 + StreamableToString(pipe_fd[1]); in AssumeRole() [all …]
|
/third_party/cef/tools/distrib/gtest/ |
D | gtest-all.cc | 9355 int pipe_fd[2]; in AssumeRole() local 9356 GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1); in AssumeRole() 9373 GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[0])); in AssumeRole() 9374 set_write_fd(pipe_fd[1]); in AssumeRole() 9385 GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1])); in AssumeRole() 9386 set_read_fd(pipe_fd[0]); in AssumeRole() 9647 int pipe_fd[2]; in AssumeRole() local 9648 GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1); in AssumeRole() 9651 GTEST_DEATH_TEST_CHECK_(fcntl(pipe_fd[1], F_SETFD, 0) != -1); in AssumeRole() 9660 + StreamableToString(pipe_fd[1]); in AssumeRole() [all …]
|