![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MonitoredProcess.h>
Inheritance diagram for FMonitoredProcess:Protected Member Functions | |
| CORE_API void | Tick () override |
| CORE_API void | ProcessOutput (const FString &Output) |
| CORE_API void | TickInternal () |
Protected Attributes | |
| TAtomic< bool > | Canceling = false |
| TAtomic< FDateTime > | EndTime |
| bool | Hidden = false |
| TAtomic< bool > | KillTree = false |
| FString | Params |
| FProcHandle | ProcessHandle |
| void * | ReadPipe = nullptr |
| TAtomic< int > | ReturnCode = 0 |
| TAtomic< FDateTime > | StartTime { 0 } |
| FRunnableThread * | Thread = nullptr |
| TAtomic< bool > | bIsRunning |
| FString | URL |
| FString | WorkingDir |
| void * | WritePipe = nullptr |
| bool | bCreatePipes = false |
| float | SleepInterval = 0.01f |
| FString | OutputBuffer |
| FSimpleDelegate | CanceledDelegate |
| FOnMonitoredProcessCompleted | CompletedDelegate |
| FOnMonitoredProcessOutput | OutputDelegate |
Implements an external process that can be monitored.
| FMonitoredProcess::FMonitoredProcess | ( | const FString & | InURL, |
| const FString & | InParams, | ||
| bool | InHidden, | ||
| bool | InCreatePipes = true |
||
| ) |
Creates a new monitored process.
| InURL | The URL of the executable to launch. |
| InParams | The command line parameters. |
| InHidden | Whether the window of the process should be hidden. |
| InCreatePipes | Whether the output should be redirected to the caller. |
| FMonitoredProcess::FMonitoredProcess | ( | const FString & | InURL, |
| const FString & | InParams, | ||
| const FString & | InWorkingDir, | ||
| bool | InHidden, | ||
| bool | InCreatePipes = true |
||
| ) |
Creates a new monitored process.
| InURL | The URL of the executable to launch. |
| InParams | The command line parameters. |
| InHidden | Whether the window of the process should be hidden. |
| InWorkingDir | The URL of the working dir where the executable should launch. |
| InCreatePipes | Whether the output should be redirected to the caller. |
|
virtual |
Destructor.
Cancels the process.
| InKillTree | Whether to kill the entire process tree when canceling this process. |
|
inline |
Returns the commandline of the process which will be executed if Launch is called
| FTimespan FMonitoredProcess::GetDuration | ( | ) | const |
Gets the duration of time that the task has been running.
| const FString & FMonitoredProcess::GetFullOutputWithoutDelegate | ( | ) | const |
Returns the full output, wihtout needing to hookup a delegate and buffer it externally. Note that if OutputDelegate is bound, this will not have the entire output
|
inline |
Gets the Process Handle. The instance can be invalid if the process was not created.
| int FMonitoredProcess::GetReturnCode | ( | ) | const |
Returns the return code from the exited process
|
inlineoverridevirtual |
Gets single thread interface pointer used for ticking this runnable when multi-threading is disabled. If the interface is not implemented, this runnable will not be ticked when FPlatformProcess::SupportsMultithreading() is false.
Reimplemented from FRunnable.
|
virtual |
Launches the process.
Reimplemented in FSerializedUATProcess.
|
inline |
Returns a delegate that is executed when the process has been canceled.
|
inline |
Returns a delegate that is executed when a monitored process completed.
|
inline |
Returns a delegate that is executed when a monitored process produces output.
|
protected |
Processes the given output string.
| Output | The output string to process. |
|
overridevirtual |
Sets the sleep interval to be used in the main thread loop.
| InSleepInterval | The Sleep interval to use. |
|
overrideprotectedvirtual |
FSingleThreadRunnable interface
Implements FSingleThreadRunnable.
|
protected |
| bool FMonitoredProcess::Update | ( | ) |
Checks whether the process is still running. In single threaded mode, this will tick the thread processing
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |