FMonitoredProcess

Implements an external process that can be monitored.

Windows
MacOS
Linux

Inheritance Hierarchy

FRunnable

FSingleThreadRunnable

FMonitoredProcess

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/MonitoredProcess.h

Include

#include "Misc/MonitoredProcess.h"

Syntax

class FMonitoredProcess :
    public FRunnable,
    private FSingleThreadRunnable

Remarks

Implements an external process that can be monitored.

Constructors

Name Description

Public function

FMonitoredProcess

(
    const FString& InURL,
    const FString& InParams,
    bool InHidden,
    bool InCreatePipes
)

Creates a new monitored process.

Public function

FMonitoredProcess

(
    const FString& InURL,
    const FString& InParams,
    const FString& InWorkingDir,
    bool InHidden,
    bool InCreatePipes
)

Creates a new monitored process.

Destructors

Name Description

Public function

~FMonitoredProcess()

Destructor.

Functions

Name Description

Public function

void

 

Cancel

(
    bool InKillTree
)

Cancels the process.

Public function Const

FTimespan

 

GetDuration()

Gets the duration of time that the task has been running.

Public function Const

FProcHandle

 

GetProcessHandle()

Gets the Process Handle. The instance can be invalid if the process was not created.

Public function Const

int

 

GetReturnCode()

Returns the return code from the exited process

Public function

bool

 

Launch()

Launches the process.

Public function

FSimpleDeleg...

 

OnCanceled()

Returns a delegate that is executed when the process has been canceled.

Public function

FOnMonitored...

 

OnCompleted()

Returns a delegate that is executed when a monitored process completed.

Public function

FOnMonitored...

 

OnOutput()

Returns a delegate that is executed when a monitored process produces output.

Protected function

void

 

ProcessOutput

(
    const FString& Output
)

Processes the given output string.

Public function

void

 

SetSleepInterval

(
    float InSleepInterval
)

Sets the sleep interval to be used in the main thread loop.

Public function

bool

 

Update()

Checks whether the process is still running.

Overridden from FRunnable

Name Description

Public function Virtual

void

 

Exit()

Exits the runnable object.

Public function Virtual

FSingleThrea...

 

GetSingleThreadInterface()

Gets single thread interface pointer used for ticking this runnable when multi-threading is disabled.

Public function Virtual

bool

 

Init()

Initializes the runnable object.

Public function Virtual

uint32

 

Run()

Runs the runnable object.

Public function Virtual

void

 

Stop()

Stops the runnable object.

This is called if a thread is requested to terminate early.

Overridden from FSingleThreadRunnable

Name Description

Protected function Virtual

void

 

Tick()

FSingleThreadRunnable interface

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