UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FProcState Struct Reference

#include <MacPlatformProcess.h>

Public Member Functions

 FProcState (const FProcState &)=delete
 
FProcStateoperator= (const FProcState &)=delete
 
 FProcState (pid_t InProcessId)
 
 ~FProcState ()
 
UE_FORCEINLINE_HINT pid_t GetProcessId () const
 
bool IsRunning ()
 
bool GetReturnCode (int32 *ReturnCodePtr)
 
void Wait ()
 
 FProcState ()
 
 FProcState (pid_t InProcessId, bool bInFireAndForget)
 
 ~FProcState ()
 
UE_FORCEINLINE_HINT pid_t GetProcessId () const
 
bool IsRunning ()
 
bool GetReturnCode (int32 *ReturnCodePtr)
 
void Wait ()
 

Protected Member Functions

 FProcState (const FProcState &Other)
 
FProcStateoperator= (const FProcState &Other)
 

Protected Attributes

pid_t ProcessId
 
bool bIsRunning = true
 
bool bHasBeenWaitedFor = false
 
int32 ReturnCode = -1
 
bool bFireAndForget
 

Friends

struct FUnixPlatformProcess
 

Detailed Description

Wrapper around Unix pid_t. Should not be copyable as changes in the process state won't be properly propagated to all copies.

Constructor & Destructor Documentation

◆ FProcState() [1/5]

FProcState::FProcState ( const FProcState )
delete

◆ FProcState() [2/5]

FProcState::FProcState ( pid_t  InProcessId)
explicit

Initialization constructor.

◆ ~FProcState() [1/2]

FProcState::~FProcState ( )

Destructor.

◆ FProcState() [3/5]

FProcState::FProcState ( )
inline

Default constructor.

◆ FProcState() [4/5]

FProcState::FProcState ( pid_t  InProcessId,
bool  bInFireAndForget 
)
explicit

Initialization constructor.

◆ ~FProcState() [2/2]

FProcState::~FProcState ( )

Destructor.

◆ FProcState() [5/5]

FProcState::FProcState ( const FProcState Other)
inlineprotected

Copy constructor - should not be publicly accessible

Member Function Documentation

◆ GetProcessId() [1/2]

UE_FORCEINLINE_HINT pid_t FProcState::GetProcessId ( ) const
inline

Getter for process id

◆ GetProcessId() [2/2]

UE_FORCEINLINE_HINT pid_t FProcState::GetProcessId ( ) const
inline

Getter for process id

◆ GetReturnCode() [1/2]

bool FProcState::GetReturnCode ( int32 ReturnCodePtr)

Returns child's return code (only valid to call if not running)

Parameters
ReturnCodeset to return code if not NULL (use the value only if method returned true)
Returns
return whether we have the return code (we don't if it crashed)

◆ GetReturnCode() [2/2]

bool FProcState::GetReturnCode ( int32 ReturnCodePtr)

Returns child's return code (only valid to call if not running)

Parameters
ReturnCodeset to return code if not NULL (use the value only if method returned true)
Returns
return whether we have the return code (we don't if it crashed)

◆ IsRunning() [1/2]

bool FProcState::IsRunning ( )

Returns whether this process is running.

Returns
true if running

◆ IsRunning() [2/2]

bool FProcState::IsRunning ( )

Returns whether this process is running.

Returns
true if running

◆ operator=() [1/2]

FProcState & FProcState::operator= ( const FProcState )
delete

◆ operator=() [2/2]

FProcState & FProcState::operator= ( const FProcState Other)
inlineprotected

Assignment operator - should not be publicly accessible

◆ Wait() [1/2]

void FProcState::Wait ( )

Waits for the process to end. Has a side effect (stores child's return code).

◆ Wait() [2/2]

void FProcState::Wait ( )

Waits for the process to end. Has a side effect (stores child's return code).

Friends And Related Symbol Documentation

◆ FUnixPlatformProcess

Member Data Documentation

◆ bFireAndForget

bool FProcState::bFireAndForget
protected

Whether this child is fire-and-forget

◆ bHasBeenWaitedFor

bool FProcState::bHasBeenWaitedFor = false
protected

Whether the process's return code has been collected

◆ bIsRunning

bool FProcState::bIsRunning = true
protected

Whether the process has finished or not (cached)

◆ ProcessId

pid_t FProcState::ProcessId
protected

Process id

◆ ReturnCode

int32 FProcState::ReturnCode = -1
protected

Return code of the process (if negative, means that process did not finish gracefully but was killed/crashed


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