Lines Matching refs:fd
52 close_on_exec(int fd)
54 int flags = fcntl(fd, F_GETFD, 0);
55 if ((flags != -1) && (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) != -1))
87 int n, fd;
100 fd = open64(path, oflag);
101 if (fd != -1) {
102 if (close_on_exec(fd) == -1) {
104 (void) close(fd);
109 return (fd);
115 int fd, err;
117 fd = contract_open(ctid, "all", "ctl", O_WRONLY);
118 if (fd == -1)
121 err = ct_ctl_abandon(fd);
122 (void) close(fd);
130 int fd;
133 if ((fd = open("/proc/self/psinfo", O_RDONLY)) == -1)
135 if (read(fd, &ps, sizeof (ps)) != sizeof (ps)) {
136 (void) close(fd);
139 (void) close(fd);