LLVM 24.0.0git
LockFileManager.cpp File Reference
#include "llvm/Support/LockFileManager.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/ExponentialBackoff.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/IOSandbox.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/raw_ostream.h"
#include <cerrno>
#include <chrono>
#include <ctime>
#include <memory>
#include <system_error>
#include <tuple>

Go to the source code of this file.

Macros

#define USE_OSX_GETHOSTUUID   0

Functions

static std::error_code getHostID (SmallVectorImpl< char > &HostID)
 Get an identifier for this machine.

Macro Definition Documentation

◆ USE_OSX_GETHOSTUUID

#define USE_OSX_GETHOSTUUID   0

Definition at line 42 of file LockFileManager.cpp.

Function Documentation

◆ getHostID()

std::error_code getHostID ( SmallVectorImpl< char > & HostID)
static

Get an identifier for this machine.

It is recorded in lock files so that the owner of a lock file is only checked for on the machine that created it, and a lock file created by another machine, for example on a network drive, is not mistaken for one created by a process on this machine.

Definition at line 90 of file LockFileManager.cpp.

References llvm::SmallVectorImpl< T >::append(), llvm::StringRef::begin(), llvm::SmallVectorImpl< T >::clear(), llvm::convertWideToUTF8(), llvm::StringRef::end(), llvm::errnoAsErrorCode(), llvm::mapWindowsError(), and llvm::Size.

Referenced by llvm::LockFileManager::tryLock().