Lines Matching +full:string +full:- +full:support
1 //===--- LockFileManager.cpp - File-level Locking Utility------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "llvm/Support/LockFileManager.h"
12 #include "llvm/Support/Errc.h"
13 #include "llvm/Support/ErrorOr.h"
14 #include "llvm/Support/ExponentialBackoff.h"
15 #include "llvm/Support/FileSystem.h"
16 #include "llvm/Support/MemoryBuffer.h"
17 #include "llvm/Support/Process.h"
18 #include "llvm/Support/Signals.h"
19 #include "llvm/Support/raw_ostream.h"
54 std::optional<std::pair<std::string, int>>
72 auto Owner = std::make_pair(std::string(Hostname), PID); in readLockFile()
120 if (StoredHostID == HostID && getsid(PID) == -1 && errno == ESRCH) in processStillExecuting()
162 this->FileName = FileName; in LockFileManager()
163 if (std::error_code EC = sys::fs::make_absolute(this->FileName)) { in LockFileManager()
164 std::string S("failed to obtain absolute path for "); in LockFileManager()
165 S.append(std::string(this->FileName)); in LockFileManager()
169 LockFileName = this->FileName; in LockFileManager()
179 UniqueLockFileName += "-%%%%%%%%"; in LockFileManager()
183 std::string S("failed to create unique file "); in LockFileManager()
184 S.append(std::string(UniqueLockFileName)); in LockFileManager()
204 std::string S("failed to write to "); in LockFileManager()
205 S.append(std::string(UniqueLockFileName)); in LockFileManager()
228 std::string S("failed to create link "); in LockFileManager()
252 std::string S("failed to remove lockfile "); in LockFileManager()
253 S.append(std::string(UniqueLockFileName)); in LockFileManager()
270 std::string LockFileManager::getErrorMessage() const { in getErrorMessage()
272 std::string Str(ErrorDiagMsg); in getErrorMessage()
273 std::string ErrCodeMsg = ErrorCode.message(); in getErrorMessage()
299 // Since we don't yet have an event-based method to wait for the lock file, in waitForUnlock()
308 // FIXME: implement event-based waiting in waitForUnlock()