Lines Matching refs:fd
47 int fd;
57 fd = open("/dev/null", O_RDWR, 0);
58 if (fd < 0)
59 fd = open("/dev/null", O_WRONLY, 0);
60 if (fd < 0) {
64 if (fd != i) {
148 int fd;
160 fd = open(file, O_RDONLY, 0644);
162 if (fd != -1) {
164 len = sss_atomic_read_s(fd, pid_str, pidlen);
169 close(fd);
184 close(fd);
190 close(fd);
197 close(fd);
213 fd = open(file, O_CREAT | O_WRONLY | O_EXCL, 0644);
215 if (fd == -1) {
226 written = sss_atomic_write_s(fd, pid_str, size);
231 close(fd);
238 close(fd);
242 close(fd);