Searched defs:fd (Results 1 - 25 of 920) sorted by relevance

1234567891011>>

/external/bison/lib/
H A Ddup-safer.c31 dup_safer (int fd) argument
33 return fcntl (fd, F_DUPFD, STDERR_FILENO + 1);
H A Ddup-safer-flag.c34 dup_safer_flag (int fd, int flag) argument
36 return fcntl (fd, (flag & O_CLOEXEC) ? F_DUPFD_CLOEXEC : F_DUPFD,
H A Dfd-safer.c37 fd_safer (int fd) argument
39 if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
41 int f = dup_safer (fd);
43 close (fd);
45 fd = f;
48 return fd;
H A Dpipe-safer.c31 pipe_safer (int fd[2]) argument
34 if (pipe (fd) == 0)
39 fd[i] = fd_safer (fd[i]);
40 if (fd[i] < 0)
43 close (fd[1 - i]);
H A Dfd-safer-flag.c40 fd_safer_flag (int fd, int flag) argument
42 if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
44 int f = dup_safer_flag (fd, flag);
46 close (fd);
48 fd = f;
51 return fd;
H A Dmsvc-nothrow.c33 _gl_nothrow_get_osfhandle (int fd) argument
39 result = _get_osfhandle (fd);
H A Dpipe2-safer.c31 pipe2_safer (int fd[2], int flags) argument
34 if (pipe2 (fd, flags) == 0)
39 fd[i] = fd_safer_flag (fd[i], flags);
40 if (fd[i] < 0)
43 close (fd[1 - i]);
H A Dspawn_faction_addclose.c37 int fd)
43 if (fd < 0 || fd >= maxfd)
47 return posix_spawn_file_actions_addclose (file_actions, fd);
61 rec->action.open_action.fd = fd;
36 posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *file_actions, int fd) argument
/external/valgrind/main/memcheck/tests/
H A Dmmaptest.c9 int fd; local
12 fd = open("dir", O_RDONLY);
13 mmap(NULL, 4711, PROT_READ, MAP_PRIVATE, fd, 0);
H A Derringfds.c10 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 );
H A Dfwrite.c8 int fd = open("/dev/null", O_WRONLY); local
9 if (fd < 0) {
12 (void)write(fd, arr, 10);
13 (void)close(fd);
/external/android-clat/
H A Dmtu.c33 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/
H A Dtest_file_util_linux.cc16 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/e2fsprogs/lib/e2p/
H A Dgetflags.c30 int getflags (int fd, unsigned long * flags) argument
35 if (fstat (fd, &buf) == -1)
57 if (!fstat(fd, &buf) &&
60 r = ioctl (fd, EXT2_IOC_GETFLAGS, &f);
H A Dsetversion.c26 int setversion (int fd, unsigned long version) argument
32 return ioctl (fd, EXT2_IOC_SETVERSION, &ver);
H A Dgetversion.c26 int getversion (int fd, unsigned long * version) argument
31 r = ioctl (fd, EXT2_IOC_GETVERSION, &ver);
/external/libselinux/src/
H A Dfsetfilecon.c10 int fsetfilecon(int fd, const security_context_t context) argument
12 return fsetxattr(fd, XATTR_NAME_SELINUX, context, strlen(context) + 1,
/external/openssh/openbsd-compat/
H A Ddaemon.c54 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/coregrind/
H A Dpub_core_libcprint.h42 or not the fd is a socket. */
44 struct { Int fd; Bool is_socket; } member in struct:__anon14985
/external/compiler-rt/lib/tsan/lit_tests/
H A Drace_on_read.cc9 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/dhcpcd/compat/
H A Dclosefrom.c33 closefrom(int fd) argument
39 for (i = fd; i < max; i++)
/external/dhcpcd/
H A Dcontrol.h34 int fd; member in struct:fd_list
/external/e2fsprogs/lib/ext2fs/
H A Dflushb.c52 errcode_t ext2fs_sync_device(int fd, int flushb) argument
60 if (fsync (fd) == -1)
66 if (ioctl (fd, BLKFLSBUF, 0) == 0)
74 ioctl (fd, FDFLUSH, 0); /* In case this is a floppy */
/external/elfutils/tests/
H A Dnewscn.c41 int fd; local
46 fprintf (stderr, "library fd of date\n");
51 fd = mkstemp (name);
52 if (fd < 0)
59 elf = elf_begin (fd, ELF_C_WRITE, NULL);
71 close (fd);
H A Drdwrmmap.c11 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);

Completed in 388 milliseconds

1234567891011>>