FProcState

Wrapper around Unix pid_t.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Unix/UnixPlatformProcess.h

Include

#include "Unix/UnixPlatformProcess.h"

Syntax

struct FProcState

Remarks

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

Variables

Name Description

Protected variable

bool

 

bFireAndForget

Whether this child is fire-and-forget

Protected variable

bool

 

bHasBeenWaitedFor

Whether the process's return code has been collected

Protected variable

bool

 

bIsRunning

Whether the process has finished or not (cached)

Protected variable

pid_t

 

ProcessId

Process id

Protected variable

int32

 

ReturnCode

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

Constructors

Name Description

Public function

FProcState()

Default constructor.

Protected function

FProcState

(
    const FProcState& Other
)

Copy constructor - should not be publicly accessible

Public function

FProcState

(
    pid_t InProcessId,
    bool bInFireAndForget
)

Initialization constructor.

Destructors

Name Description

Public function

~FProcState()

Destructor.

Functions

Name Description

Public function Const

pid_t

 

GetProcessId()

Getter for process id

Public function

bool

 

GetReturnCode

(
    int32* ReturnCodePtr
)

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

Public function

bool

 

IsRunning()

Returns whether this process is running.

Public function

void

 

Wait()

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

Operators

Name Description

Protected function

FProcState &

 

operator=

(
    const FProcState& Other
)

Assignment operator - should not be publicly accessible

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss