Lines Matching defs:lock_fd
201 int lock_fd;
213 lock_fd = open(path, O_CREAT|O_RDWR, 0644);
214 if (lock_fd == -1)
222 if (fcntl(lock_fd, F_SETLKW, &lock) == -1) {
223 (void) close(lock_fd);
227 return (lock_fd);
231 unlock_index_file(int lock_fd)
240 if (fcntl(lock_fd, F_SETLK, &lock) == -1)
243 if (close(lock_fd) == -1)
273 int tmp_file_desc, lock_fd, err;
299 if ((lock_fd = lock_index_file()) == -1)
306 (void) unlock_index_file(lock_fd);
316 (void) unlock_index_file(lock_fd);
472 if (unlock_index_file(lock_fd) != Z_OK)
483 (void) unlock_index_file(lock_fd);