Home | History | Annotate | Download | only in import

Lines Matching refs:fd

29 /* Return FD, unless FD would be a copy of standard input, output, or
30 error; in that case, return a duplicate of FD, closing FD. If FLAG
31 contains O_CLOEXEC, the returned FD will have close-on-exec
32 semantics. On failure to duplicate, close FD, set errno, and
33 return -1. Preserve errno if FD is negative, so that the caller
40 fd_safer_flag (int fd, int flag)
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;