Lines Matching refs:dirfd
76 pidfile_read_impl(int dirfd, const char *filename, pid_t *pidptr) in pidfile_read_impl() argument
81 fd = openat(dirfd, filename, O_RDONLY | O_CLOEXEC); in pidfile_read_impl()
102 pidfile_read(int dirfd, const char *filename, pid_t *pidptr) in pidfile_read() argument
111 errno = pidfile_read_impl(dirfd, filename, pidptr); in pidfile_read()
127 int error, fd, dirfd, dirlen, filenamelen; in pidfile_open() local
159 dirfd = open(pfh->pf_dir, O_CLOEXEC | O_DIRECTORY | O_NONBLOCK); in pidfile_open()
160 if (dirfd == -1) { in pidfile_open()
173 fd = flopenat(dirfd, pfh->pf_filename, in pidfile_open()
180 errno = pidfile_read(dirfd, in pidfile_open()
187 close(dirfd); in pidfile_open()
201 if (cap_rights_limit(dirfd, in pidfile_open()
212 pfh->pf_dirfd = dirfd; in pidfile_open()
221 unlinkat(dirfd, pfh->pf_filename, 0); in pidfile_open()
222 close(dirfd); in pidfile_open()