Navigation
API > API/Runtime > API/Runtime/Core
Implements an external process that can be monitored.
| Name | FMonitoredProcess |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/MonitoredProcess.h |
| Include Path | #include "Misc/MonitoredProcess.h" |
Syntax
class FMonitoredProcess :
public FRunnable ,
private FSingleThreadRunnable
Inheritance Hierarchy
- FRunnable → FMonitoredProcess
- FSingleThreadRunnable → FMonitoredProcess
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMonitoredProcess
(
const FString& InURL, |
Creates a new monitored process. | Misc/MonitoredProcess.h | |
FMonitoredProcess
(
const FString& InURL, |
Creates a new monitored process. | Misc/MonitoredProcess.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FMonitoredProcess() |
Destructor. | Misc/MonitoredProcess.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Cancel
(
bool InKillTree |
Cancels the process. | Misc/MonitoredProcess.h | |
FString GetCommandline() |
Returns the commandline of the process which will be executed if Launch is called | Misc/MonitoredProcess.h | |
FTimespan GetDuration() |
Gets the duration of time that the task has been running. | Misc/MonitoredProcess.h | |
const FString & GetFullOutputWithoutDelegate () |
Returns the full output, wihtout needing to hookup a delegate and buffer it externally. | Misc/MonitoredProcess.h | |
FProcHandle GetProcessHandle() |
Gets the Process Handle. The instance can be invalid if the process was not created. | Misc/MonitoredProcess.h | |
int GetReturnCode() |
Returns the return code from the exited process | Misc/MonitoredProcess.h | |
virtual bool Launch() |
Launches the process. | Misc/MonitoredProcess.h | |
FSimpleDelegate & OnCanceled() |
Returns a delegate that is executed when the process has been canceled. | Misc/MonitoredProcess.h | |
FOnMonitoredProcessCompleted & OnCompleted() |
Returns a delegate that is executed when a monitored process completed. | Misc/MonitoredProcess.h | |
FOnMonitoredProcessOutput & OnOutput() |
Returns a delegate that is executed when a monitored process produces output. | Misc/MonitoredProcess.h | |
void SetSleepInterval
(
float InSleepInterval |
Sets the sleep interval to be used in the main thread loop. | Misc/MonitoredProcess.h | |
bool Update () |
Checks whether the process is still running. | Misc/MonitoredProcess.h |
Overridden from FRunnable
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Exit () |
Exits the runnable object. | Misc/MonitoredProcess.h | |
virtual FSingleThreadRunnable * GetSingleThreadInterface () |
Gets single thread interface pointer used for ticking this runnable when multi-threading is disabled. | Misc/MonitoredProcess.h | |
virtual bool Init () |
Initializes the runnable object. | Misc/MonitoredProcess.h | |
virtual uint32 Run () |
Runs the runnable object. | Misc/MonitoredProcess.h | |
virtual void Stop () |
Stops the runnable object.This is called if a thread is requested to terminate early. | Misc/MonitoredProcess.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ProcessOutput
(
const FString& Output |
Processes the given output string. | Misc/MonitoredProcess.h | |
void TickInternal() |
Misc/MonitoredProcess.h |
Overridden from FSingleThreadRunnable
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Tick() |
FSingleThreadRunnable interface | Misc/MonitoredProcess.h |