Lines Matching defs:lfd
105 static int lfd; /* lock file descriptor */
207 lfd = open(pp->lock_file, O_WRONLY|O_CREAT|O_EXLOCK|O_NONBLOCK,
209 if (lfd < 0) {
223 if (fcntl(lfd, F_SETFL, 0) < 0) {
228 ftruncate(lfd, 0);
234 if (write(lfd, line, i) != i) {
250 if (fchmod(lfd, stb.st_mode & ~LFM_RESET_QUE) < 0)
282 (void) lseek(lfd, pidoff, 0);
285 if (write(lfd, line, i) != i)
296 if (fstat(lfd, &stb) == 0) {
304 if (fchmod(lfd, stb.st_mode & ~LFM_RESET_QUE)
328 if (ftruncate(lfd, pidoff) < 0)