Searched refs:lock_fd_ (Results 1 – 4 of 4) sorted by relevance
60 lock_fd_ = -1; in Init()72 lock_fd_ = open(old_lock_file_.value().c_str(), O_CREAT | O_EXCL, 0644); in Lock()79 close(lock_fd_); in Unlock()80 lock_fd_ = -1; in Unlock()85 return (lock_fd_ >= 0); in HasAcquired()96 lock_fd_ = open(lock_file_.value().c_str(), O_WRONLY | O_CREAT | O_TRUNC, in LockWithFcntl()98 if (lock_fd_ == -1) in LockWithFcntl()109 if (fcntl(lock_fd_, F_GETLK, &testlock) == -1) { in LockWithFcntl()110 close(lock_fd_); in LockWithFcntl()111 lock_fd_ = -1; in LockWithFcntl()[all …]
97 int lock_fd_; variable
45 lock_fd_(-1) { in ProcessSingleton()72 DCHECK_EQ(-1, lock_fd_) << "lock_path_ is already open."; in Create()74 lock_fd_ = HANDLE_EINTR(open(lock_path_.value().c_str(), in Create()76 if (lock_fd_ == -1) { in Create()78 DPCHECK(lock_fd_ != -1) << "Unexpected failure opening profile lockfile"; in Create()86 int rc = HANDLE_EINTR(flock(lock_fd_, LOCK_EX|LOCK_NB)); in Create()111 if (lock_fd_ != -1) { in Cleanup()112 int rc = HANDLE_EINTR(close(lock_fd_)); in Cleanup()115 lock_fd_ = -1; in Cleanup()
175 int lock_fd_; variable