/external/openssh/openbsd-compat/ |
daemon.c | 54 int fd; local 71 if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { 72 (void)dup2(fd, STDIN_FILENO); 73 (void)dup2(fd, STDOUT_FILENO); 74 (void)dup2(fd, STDERR_FILENO); 75 if (fd > 2) 76 (void)close (fd);
|
/external/valgrind/main/memcheck/tests/ |
mmaptest.c | 9 int fd; local 12 fd = open("dir", O_RDONLY); 13 mmap(NULL, 4711, PROT_READ, MAP_PRIVATE, fd, 0);
|
erringfds.c | 10 int fd, n; local 12 fd = open("foo/bar/xyzzy", O_RDONLY); /* fails */ 13 printf("fd = %d\n", fd); 14 n = read ( fd, buf, 10 );
|
fwrite.c | 8 int fd = open("/dev/null", O_WRONLY); local 9 if (fd < 0) { 12 (void)write(fd, arr, 10); 13 (void)close(fd);
|
/bionic/libc/bionic/ |
daemon.c | 41 int fd = open("/dev/null", O_RDWR); local 43 if ( fd < 0 ) 46 if ( dup2( fd, 0 ) < 0 || 47 dup2( fd, 1 ) < 0 || 48 dup2( fd, 2 ) < 0 ) 50 close(fd); 53 close(fd);
|
/bionic/libc/upstream-freebsd/lib/libc/stdio/ |
fileno.c | 50 int fd; local 53 fd = __sfileno(fp); 56 return (fd);
|
/bionic/tests/ |
eventfd_test.cpp | 25 int fd = eventfd(initial_value, O_NONBLOCK); local 26 ASSERT_NE(fd, -1); 29 ASSERT_EQ(0, eventfd_read(fd, &value)); 33 ASSERT_EQ(-1, eventfd_read(fd, &value)); 37 ASSERT_EQ(0, eventfd_write(fd, 1)); 38 ASSERT_EQ(0, eventfd_write(fd, 1)); 39 ASSERT_EQ(0, eventfd_write(fd, 1)); 41 ASSERT_EQ(0, eventfd_read(fd, &value)); 44 close(fd);
|
statvfs_test.cpp | 51 int fd = open("/", O_RDONLY); local 52 ASSERT_EQ(0, fstatvfs(fd, &sb)); 53 close(fd); 62 fd = open("/data/local/tmp", O_RDONLY); 63 ASSERT_EQ(0, fstatvfs(fd, &sb)); 64 close(fd);
|
/external/android-clat/ |
mtu.c | 33 int fd; local 36 fd = socket(AF_INET, SOCK_STREAM, 0); 37 if(fd < 0) { 42 if(ioctl(fd, SIOCGIFMTU, &if_mtu) < 0) {
|
/external/chromium/base/test/ |
test_file_util_linux.cc | 16 int fd = open(file.value().c_str(), O_RDONLY); local 17 if (fd < 0) 19 if (fdatasync(fd) != 0) 21 if (posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED) != 0) 23 close(fd);
|
/external/chromium_org/base/test/ |
test_file_util_linux.cc | 17 int fd = open(file.value().c_str(), O_RDONLY); local 18 if (fd < 0) 20 if (fdatasync(fd) != 0) 22 if (posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED) != 0) 24 close(fd);
|
/external/compiler-rt/lib/asan/lit_tests/TestCases/ |
ioctl.cc | 14 int fd = socket(AF_INET, SOCK_DGRAM, 0); local 17 int res = ioctl(fd, FIONBIO, &nonblock + 1); 22 close(fd);
|
/external/compiler-rt/lib/msan/lit_tests/Linux/ |
tcgetattr.cc | 11 int fd = getpt(); local 12 assert(fd >= 0); 15 int res = tcgetattr(fd, &t);
|
/external/compiler-rt/lib/msan/lit_tests/ |
ioctl.cc | 11 int fd = socket(AF_INET, SOCK_DGRAM, 0); local 14 int res = ioctl(fd, FIOGETOWN, &z); 16 close(fd);
|
/external/compiler-rt/lib/tsan/lit_tests/ |
race_on_read.cc | 9 int fd; variable 13 read(fd, &buf, 1); 18 fd = open("/dev/random", O_RDONLY); 19 if (fd < 0) return 1; 25 close(fd);
|
/external/elfutils/libdwfl/ |
dwfl_build_id_find_debuginfo.c | 64 int fd = -1; local 68 fd = __libdwfl_open_by_build_id (mod, true, debuginfo_file_name); 69 if (fd >= 0) 74 mod->debug.elf = elf_begin (fd, ELF_C_READ_MMAP_PRIVATE, NULL); 83 close (fd); 84 fd = -1; 90 return fd;
|
/external/elfutils/tests/ |
early-offscn.c | 46 int fd = open (argv[1], O_RDONLY); local 47 if (fd < 0) 50 Elf *elf = elf_begin (fd, ELF_C_READ, NULL);
|
rdwrmmap.c | 11 int fd = open (argv[1], O_RDWR); local 12 if (fd < 0) 18 Elf *elf = elf_begin (fd, ELF_C_RDWR_MMAP, NULL); 26 close (fd);
|
/external/libselinux/src/ |
check_context.c | 15 int fd, ret; local 23 fd = open(path, O_RDWR); 24 if (fd < 0) 27 ret = write(fd, con, strlen(con) + 1); 28 close(fd);
|
load_policy.c | 22 int fd, ret; local 30 fd = open(path, O_RDWR); 31 if (fd < 0) 34 ret = write(fd, data, len); 35 close(fd);
|
/external/valgrind/main/coregrind/ |
pub_core_libcprint.h | 42 or not the fd is a socket. */ 44 struct { Int fd; Bool is_socket; } member in struct:__anon30710
|
/external/valgrind/main/none/tests/ |
closeall.c | 9 int fd; local 13 for ( fd = 3; fd < lim.rlim_cur; fd++ ) 14 close( fd );
|
rlimit_nofile.c | 13 int fd; local 92 if ((fd = open("/dev/null", O_RDONLY)) >= 0) 94 fprintf(stderr, "open succeeded with fd %d - it should have failed!\n", fd);
|
/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/test/ |
tf_inherit_check.py | 10 fd = int(sys.argv[2]) variable 13 os.write(fd, "blat") 15 # Success -- could not write to fd. 19 sys.stderr.write("fd %d is open in child" % fd)
|
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/test/ |
tf_inherit_check.py | 10 fd = int(sys.argv[2]) variable 13 os.write(fd, "blat") 15 # Success -- could not write to fd. 19 sys.stderr.write("fd %d is open in child" % fd)
|