UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IProcessSentinel Class Referenceabstract

#include <GenericPlatformProcess.h>

+ Inheritance diagram for IProcessSentinel:

Public Member Functions

virtual bool CreateSentinelFile (const TCHAR *Name, const FString &Contents)=0
 

Static Public Member Functions

static bool CORE_API DoesSentinelFileExist (const TCHAR *Name, FString *OptionalOutContents=nullptr)
 

Protected Member Functions

virtual FString CORE_API MakeFilename (const TCHAR *Name)
 
virtual bool DoesSentinelFileExistImpl (const TCHAR *Name, FString *OptionalOutContents=nullptr)=0
 

Detailed Description

A helper class that creates and checks for existence of a sentinel file that can be tied to process lifetime. NOTE: The generic version will not handle the case where a process just dies without crashing - the file will not be deleted. The three desktop platforms have subclasses that will make sure that DoesSentinelFileExist will return false if the process that created it is not running. DO NOT assume FileExists() type calls would be accurate (and also there's not a public method to retrieve the path to discourage such a check anyway).

Member Function Documentation

◆ CreateSentinelFile()

virtual bool IProcessSentinel::CreateSentinelFile ( const TCHAR Name,
const FString &  Contents 
)
pure virtual

Create the sentinel file, if possible

Returns
false if the file could not be created (because another process has it locked)

Implemented in FGenericProcessSentinel, FPosixOSProcessSentinel, and FWindowsProcessSentinel.

◆ DoesSentinelFileExist()

bool IProcessSentinel::DoesSentinelFileExist ( const TCHAR Name,
FString *  OptionalOutContents = nullptr 
)
static

Query for existence of a sentinel file (usually from another process than created it)

◆ DoesSentinelFileExistImpl()

virtual bool IProcessSentinel::DoesSentinelFileExistImpl ( const TCHAR Name,
FString *  OptionalOutContents = nullptr 
)
protectedpure virtual

The actual implementation to determine if the sentinel file is exists and is valid (due to a process dying, the file may actually exist on disk, but isn't a valid file anymore, so a simple FileExists may not be good enough

Implemented in FPosixOSProcessSentinel, and FWindowsProcessSentinel.

◆ MakeFilename()

FString IProcessSentinel::MakeFilename ( const TCHAR Name)
protectedvirtual

Helper to create the path for the sentinel file. Defaults to ProcessIntermediate() dir


The documentation for this class was generated from the following files: