/external/valgrind/main/none/tests/ |
fdleak_pipe.c | 6 int fds[2]; local 10 DO( pipe(fds) );
|
fdleak_socketpair.c | 8 int fds[2]; local 12 DO( socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, fds) );
|
syscall-restart1.c | 18 int fds[2]; local 20 if (pipe(fds) == -1) { 43 close(fds[1]); 44 ret = read(fds[0], &ch, 1); 52 close(fds[0]); 56 if (write(fds[1], "x", 1) != -1 || errno != EPIPE)
|
syscall-restart2.c | 18 int fds[2]; local 20 if (pipe(fds) == -1) { 43 close(fds[1]); 44 ret = read(fds[0], &ch, 1); 52 close(fds[0]); 56 write(fds[1], "x", 1);
|
/external/compiler-rt/lib/tsan/lit_tests/ |
fd_location.cc | 6 int fds[2]; variable 9 write(fds[1], "a", 1); 15 close(fds[0]); 16 close(fds[1]); 21 pipe(fds);
|
fd_pipe_race.cc | 6 int fds[2]; variable 9 write(fds[1], "a", 1); 15 close(fds[0]); 16 close(fds[1]); 21 pipe(fds);
|
fd_dup_norace.cc | 9 int fds[2]; variable 13 read(fds[0], &buf, 1); 14 close(fds[0]); 19 close(fds[1]); 24 fds[0] = open("/dev/random", O_RDONLY); 25 fds[1] = dup2(fds[0], 100);
|
fd_pipe_norace.cc | 6 int fds[2]; variable 11 write(fds[1], "a", 1); 17 while (read(fds[0], &buf, 1) != 1) { 24 pipe(fds);
|
fd_socketpair_norace.cc | 8 int fds[2]; variable 13 write(fds[1], "a", 1); 14 close(fds[1]); 20 while (read(fds[0], &buf, 1) != 1) { 23 close(fds[0]); 28 socketpair(AF_UNIX, SOCK_STREAM, 0, fds);
|
/external/openssh/openbsd-compat/regress/ |
closefromtest.c | 39 int i, max, fds[NUM_OPENS]; local 43 if ((fds[i] = open("/dev/null", O_RDONLY)) == -1) 48 closefrom(fds[max]); 49 if (close(fds[max]) != -1) 54 if (read(fds[i], buf, sizeof(buf)) == -1) 57 /* should close all fds */ 58 closefrom(fds[0]); 60 if (close(fds[i]) != -1)
|
/frameworks/wilhelm/tests/sandbox/ |
getch.c | 38 fd_set fds; local 39 FD_ZERO(&fds); // not in original posting to stackoverflow 40 FD_SET(0, &fds); 41 return select(1, &fds, NULL, NULL, &tv);
|
/system/extras/tests/storage/ |
opentest.c | 30 int *fds; local 64 fds = malloc(nfiles * sizeof(int)); 65 if (fds == 0) { 66 fprintf(stderr, "Unable to malloc array of %d fds\n", nfiles); 84 fds[i] = open(name, O_WRONLY | O_CREAT, 0666); 85 if (fds[i] < 0) {
|
/external/chromium/chrome/browser/ |
process_info_snapshot_mac_unittest.cc | 100 int fds[2]; local 101 PCHECK(pipe(fds) == 0); 103 fds_to_remap.push_back(std::make_pair(fds[1], 1)); 115 PCHECK(HANDLE_EINTR(close(fds[1])) == 0); 120 PCHECK(HANDLE_EINTR(read(fds[0], buf, 1)) == 1); 135 PCHECK(HANDLE_EINTR(close(fds[0])) == 0);
|
/external/e2fsprogs/lib/ |
fpopen.c | 42 int fds[2]; local 92 if (pipe(fds) < 0) 101 close(fds[1]); 102 dup2(fds[0], 0); 104 close(fds[0]); 105 dup2(fds[1], 1); 107 dup2(fds[1], 2); 113 return fdopen(do_stdin ? fds[1] : fds[0], mode);
|
/external/qemu/ |
compatfd.c | 75 int fds[2]; local 83 if (pipe(fds) == -1) { 88 qemu_set_cloexec(fds[0]); 89 qemu_set_cloexec(fds[1]); 92 info->fd = fds[1]; 101 return fds[0];
|
cpus.c | 132 int fds[2]; local 134 err = pipe(fds); 138 err = fcntl_setfl(fds[0], O_NONBLOCK); 142 err = fcntl_setfl(fds[1], O_NONBLOCK); 146 qemu_set_fd_handler2(fds[0], NULL, qemu_event_read, NULL, 147 (void *)(unsigned long)fds[0]); 149 io_thread_fd = fds[1]; 153 close(fds[0]); 154 close(fds[1]);
|
/frameworks/base/libs/androidfw/tests/ |
TestHelpers.h | 30 int fds[2]; local 31 ::pipe(fds); 33 receiveFd = fds[0]; 34 sendFd = fds[1];
|
/frameworks/native/libs/utils/tests/ |
TestHelpers.h | 30 int fds[2]; local 31 ::pipe(fds); 33 receiveFd = fds[0]; 34 sendFd = fds[1];
|
/hardware/libhardware_legacy/uevent/ |
uevent.c | 76 struct pollfd fds; local 79 fds.fd = fd; 80 fds.events = POLLIN; 81 fds.revents = 0; 82 nr = poll(&fds, 1, -1); 84 if(nr > 0 && (fds.revents & POLLIN)) {
|
/libcore/luni/src/main/native/ |
libcore_net_RawSocket.cpp | 167 pollfd fds[1]; local 168 fds[0].fd = fd.get(); 169 fds[0].events = POLLIN; 170 int retval = poll(fds, 1, timeout_millis);
|
/external/dhcpcd/ |
control.c | 50 struct fd_list *fds = NULL; variable in typeref:struct:fd_list 57 for (l = fds; l != NULL; l = l->next) { 62 fds = l->next; 114 l->next = fds; 115 fds = l; 143 listen(fd, sizeof(fds)) == -1) 165 l = fds;
|
/external/dropbear/ |
common-session.c | 163 * We don't want to read/write FDs. */ 288 fd_set fds; local 297 FD_ZERO(&fds); 304 FD_SET(fd, &fds); 308 if (select(fd+1, &fds, NULL, NULL, &timeout) < 0) { 321 if (FD_ISSET(fd, &fds)) {
|
/frameworks/base/core/jni/ |
android_os_ParcelFileDescriptor.cpp | 57 int fds[2]; local 58 if (pipe(fds) < 0) { 65 jobject fdObj = jniCreateFileDescriptor(env, fds[i]);
|
/hardware/ti/omap4xxx/libtiutils/ |
MessageQueue.cpp | 44 int fds[2] = {-1,-1}; local 47 stat = pipe(fds); 58 this->fd_read = fds[0]; 59 this->fd_write = fds[1];
|
/system/core/adb/ |
framebuffer_service.c | 62 int fds[2]; local 64 if (pipe(fds) < 0) goto done; 70 dup2(fds[1], STDOUT_FILENO); 71 close(fds[0]); 72 close(fds[1]); 79 fd_screencap = fds[0]; 177 close(fds[0]); 178 close(fds[1]);
|