engine
 
载入中...
搜索中...
未找到
类 | 静态 Public 成员函数 | 所有成员列表
FGenericPlatformProcess结构体 参考

Generic implementation for most platforms, these tend to be unused and unimplemented 更多...

#include <GenericPlatformProcess.h>

+ 类 FGenericPlatformProcess 继承关系图:

类

struct  FSemaphore
 Generic representation of a interprocess semaphore 更多...
 

静态 Public 成员函数

static FORCEINLINE void AddDllDirectory (const TCHAR *Directory)
 Adds a directory to search in when resolving implicitly loaded or filename-only DLLs.
 
static const TCHAR * ApplicationSettingsDir ()
 Get application settings directory. 更多...
 
static const TCHAR * BaseDir ()
 Get startup directory. 更多...
 
static bool CanLaunchURL (const TCHAR *URL)
 Checks if the platform can launch a uniform resource locator (i.e. 更多...
 
static void CleanShaderWorkingDir ()
 Clean the shader working directory.
 
static void ClosePipe (void *ReadPipe, void *WritePipe)
 Closes an anonymous pipe. 更多...
 
static void CloseProc (FProcHandle &ProcessHandle)
 Cleans up FProcHandle after we're done with it. 更多...
 
static const TCHAR * ComputerName ()
 Get computer name. 更多...
 
static void ConditionalSleep (TFunctionRef< bool()> Condition, float SleepTime=0.0f)
 Sleep thread until condition is satisfied. 更多...
 
static bool CreatePipe (void *&ReadPipe, void *&WritePipe)
 Creates a writable anonymous pipe. 更多...
 
static FProcHandle CreateProc (const TCHAR *URL, const TCHAR *Parms, bool bLaunchDetached, bool bLaunchHidden, bool bLaunchReallyHidden, uint32 *OutProcessID, int32 PriorityModifier, const TCHAR *OptionalWorkingDirectory, void *PipeWriteChild, void *PipeReadChild=nullptr)
 Creates a new process and its primary thread. 更多...
 
static class FRunnableThread * CreateRunnableThread ()
 Creates the platform-specific runnable thread. 更多...
 
static class FEvent * CreateSynchEvent (bool bIsManualReset=false)
 Creates a new event. 更多...
 
static bool Daemonize ()
 Makes process run as a system service (daemon), i.e. 更多...
 
static bool DeleteInterprocessSynchObject (FSemaphore *Object)
 Deletes an interprocess synchronization object. 更多...
 
static bool ExecElevatedProcess (const TCHAR *URL, const TCHAR *Params, int32 *OutReturnCode)
 Executes a process as administrator, requesting elevation as necessary. 更多...
 
static bool ExecProcess (const TCHAR *URL, const TCHAR *Params, int32 *OutReturnCode, FString *OutStdOut, FString *OutStdErr, const TCHAR *OptionalWorkingDirectory=NULL)
 Executes a process, returning the return code, stdout, and stderr. 更多...
 
static const TCHAR * ExecutableName (bool bRemoveExtension=true)
 Return the name of the currently running executable 更多...
 
static const TCHAR * ExecutablePath ()
 Return the path to the currently running executable 更多...
 
static void ExploreFolder (const TCHAR *FilePath)
 Attempt to "explore" the folder specified by the provided file path 更多...
 
static void FlushPoolSyncEvents ()
 Deletes all the recycled sync events contained by the pools
 
static void FreeDllHandle (void *DllHandle)
 Free a DLL.
 
static FString GenerateApplicationPath (const FString &AppName, EBuildConfiguration BuildConfiguration)
 Generates the path to the specified application or game. 更多...
 
static bool GetApplicationMemoryUsage (uint32 ProcessId, SIZE_T *OutMemoryUsage)
 Outputs the virtual memory usage, of the process with the specified PID
 
static FString GetApplicationName (uint32 ProcessId)
 Returns the Name of process given by the PID. 更多...
 
static const TCHAR * GetBinariesSubdirectory ()
 Used only by platforms with DLLs, this gives the subdirectory from binaries to find the executables
 
static uint32 GetCurrentCoreNumber ()
 Retrieves the current hardware CPU core 更多...
 
static uint32 GetCurrentProcessId ()
 Retrieves the ProcessId of this process. 更多...
 
static FString GetCurrentWorkingDirectory ()
 Get the current working directory (only really makes sense on desktop platforms)
 
static ENamedThreads::Type GetDesiredThreadForUObjectReferenceCollector ()
 specifies the thread to use for UObject reference collection
 
static FORCEINLINE void GetDllDirectories (TArray< FString > &OutDllDirectories)
 Get the list of registered directories to search in when resolving implicitly loaded or filename-only DLLs.
 
static void * GetDllExport (void *DllHandle, const TCHAR *ProcName)
 Lookup the address of a DLL function.
 
static void * GetDllHandle (const TCHAR *Filename)
 Load a DLL.
 
static FString GetGameBundleId ()
 Retrieves the platform-specific bundle identifier or package name of the game 更多...
 
static const TCHAR * GetModuleExtension ()
 Return the extension of dynamic library 更多...
 
static const TCHAR * GetModulePrefix ()
 Return the prefix of dynamic library (e.g. 更多...
 
static const FString GetModulesDirectory ()
 Used only by platforms with DLLs, this gives the full path to the main directory containing modules 更多...
 
static bool GetProcReturnCode (FProcHandle &ProcHandle, int32 *ReturnCode)
 Retrieves the termination status of the specified process.
 
static class FEvent * GetSynchEventFromPool (bool bIsManualReset=false)
 Gets an event from the pool or creates a new one if necessary. 更多...
 
static bool IsApplicationRunning (const TCHAR *ProcName)
 Returns true if the specified application is running
 
static bool IsApplicationRunning (uint32 ProcessId)
 Returns true if the specified application is running
 
static bool IsFirstInstance ()
 Checks if we're the first instance. 更多...
 
static bool IsProcRunning (FProcHandle &ProcessHandle)
 Returns true if the specified process is running 更多...
 
static void LaunchFileInDefaultExternalApplication (const TCHAR *FileName, const TCHAR *Parms=NULL, ELaunchVerb::Type Verb=ELaunchVerb::Open)
 Attempt to launch the provided file name in its default external application. 更多...
 
static void LaunchURL (const TCHAR *URL, const TCHAR *Parms, FString *Error)
 Launch a uniform resource locator (i.e. 更多...
 
static void ModifyThreadAssignmentForUObjectReferenceCollector (int32 &NumThreads, int32 &NumBackgroundThreads, ENamedThreads::Type &NormalThreadName, ENamedThreads::Type &BackgroundThreadName)
 allows a platform to override the threading configuration for reference collection
 
static FSemaphore * NewInterprocessSynchObject (const FString &Name, bool bCreate, uint32 MaxLocks=1)
 Creates or opens an interprocess synchronization object. 更多...
 
static FSemaphore * NewInterprocessSynchObject (const TCHAR *Name, bool bCreate, uint32 MaxLocks=1)
 Creates or opens an interprocess synchronization object. 更多...
 
static FProcHandle OpenProcess (uint32 ProcessID)
 Opens an existing process. 更多...
 
static FORCEINLINE void PopDllDirectory (const TCHAR *Directory)
 Unsets a directory to look for DLL files. 更多...
 
static FORCEINLINE void PushDllDirectory (const TCHAR *Directory)
 Set a directory to look for DLL files. 更多...
 
static FString ReadPipe (void *ReadPipe)
 Reads all pending data from an anonymous pipe, such as STDOUT or STDERROR of a process. 更多...
 
static bool ReadPipeToArray (void *ReadPipe, TArray< uint8 > &Output)
 Reads all pending data from an anonymous pipe, such as STDOUT or STDERROR of a process. 更多...
 
static void ReturnSynchEventToPool (FEvent *Event)
 Returns an event to the pool. 更多...
 
static bool SetProcessLimits (EProcessResource::Type Resource, uint64 Limit)
 Sets the process limits. 更多...
 
static void SetRealTimeMode ()
 Enables Real Time Mode on the current thread.
 
static void SetThreadAffinityMask (uint64 AffinityMask)
 Change the thread processor affinity 更多...
 
static void SetThreadName (const TCHAR *ThreadName)
 Helper function to set thread name of the current thread. 更多...
 
static void SetupAudioThread ()
 Allow the platform to do anything it needs for audio thread
 
static void SetupGameThread ()
 Allow the platform to do anything it needs for game thread
 
static void SetupRenderThread ()
 Allow the platform to do anything it needs for render thread
 
static const FString ShaderWorkingDir ()
 Get the shader working directory. 更多...
 
static bool ShouldSaveToUserDir ()
 Content saved to the game or engine directories should be rerouted to user directories instead
 
static bool SkipWaitForStats ()
 force skip calling FThreadStats::WaitForStats()
 
static bool SupportsMultithreading ()
 Gets whether this platform can use multiple threads. 更多...
 
static void TearDown ()
 Tears down allocated process resources.
 
static void TeardownAudioThread ()
 Allow the platform to tear down the audio thread
 
static void TerminateProc (FProcHandle &ProcessHandle, bool KillTree=false)
 Terminates a process 更多...
 
static const TCHAR * UserDir ()
 Get user directory. 更多...
 
static const TCHAR * UserName (bool bOnlyAlphaNumeric=true)
 Get user name. 更多...
 
static const TCHAR * UserSettingsDir ()
 Get the user settings directory. 更多...
 
static const TCHAR * UserTempDir ()
 Get the user temporary directory. 更多...
 
static EWaitAndForkResult WaitAndFork ()
 Waits for process signals and forks child processes. 更多...
 
static void WaitForProc (FProcHandle &ProcessHandle)
 Waits for a process to stop 更多...
 
static bool WritePipe (void *WritePipe, const FString &Message, FString *OutWritten=nullptr)
 Sends the message to process through pipe 更多...
 
static bool WritePipe (void *WritePipe, const uint8 *Data, const int32 DataLength, int32 *OutDataLength=nullptr)
 Sends data to process through pipe 更多...
 
static FORCEINLINE void Yield ()
 Tells the processor to pause for implementation-specific amount of time. 更多...
 

详细描述

Generic implementation for most platforms, these tend to be unused and unimplemented

成员函数说明

◆ ApplicationSettingsDir()

static const TCHAR * FGenericPlatformProcess::ApplicationSettingsDir ( )
static

Get application settings directory.

NOTE: Only one return value is valid at a time!

◆ BaseDir()

static const TCHAR * FGenericPlatformProcess::BaseDir ( )
static

Get startup directory.

NOTE: Only one return value is valid at a time!

◆ CanLaunchURL()

static bool FGenericPlatformProcess::CanLaunchURL ( const TCHAR *  URL)
static

Checks if the platform can launch a uniform resource locator (i.e.

http://www.epicgames.com/unreal).

◆ ClosePipe()

static void FGenericPlatformProcess::ClosePipe ( void *  ReadPipe,
void *  WritePipe 
)
static

Closes an anonymous pipe.

参数
ReadPipeThe handle to the read end of the pipe.
WritePipeThe handle to the write end of the pipe.
参见
CreatePipe, ReadPipe

◆ CloseProc()

static void FGenericPlatformProcess::CloseProc ( FProcHandle &  ProcessHandle)
static

Cleans up FProcHandle after we're done with it.

参数
ProcessHandlehandle returned from FPlatformProcess::CreateProc.

◆ ComputerName()

static const TCHAR * FGenericPlatformProcess::ComputerName ( )
static

Get computer name.

NOTE: Only one return value is valid at a time!

◆ ConditionalSleep()

static void FGenericPlatformProcess::ConditionalSleep ( TFunctionRef< bool()>  Condition,
float  SleepTime = 0.0f 
)
static

Sleep thread until condition is satisfied.

参数
ConditionCondition to evaluate.
SleepTimeTime to sleep

◆ CreatePipe()

static bool FGenericPlatformProcess::CreatePipe ( void *&  ReadPipe,
void *&  WritePipe 
)
static

Creates a writable anonymous pipe.

Anonymous pipes can be used to capture and/or redirect STDOUT and STDERROR of a process. The pipe created by this method can be passed into CreateProc as Write

参数
ReadPipeWill hold the handle to the read end of the pipe.
WritePipeWill hold the handle to the write end of the pipe.
返回
true on success, false otherwise.
参见
ClosePipe, ReadPipe

◆ CreateProc()

static FProcHandle FGenericPlatformProcess::CreateProc ( const TCHAR *  URL,
const TCHAR *  Parms,
bool  bLaunchDetached,
bool  bLaunchHidden,
bool  bLaunchReallyHidden,
uint32 *  OutProcessID,
int32  PriorityModifier,
const TCHAR *  OptionalWorkingDirectory,
void *  PipeWriteChild,
void *  PipeReadChild = nullptr 
)
static

Creates a new process and its primary thread.

The new process runs the specified executable file in the security context of the calling process.

参数
URLexecutable name
Parmscommand line arguments
bLaunchDetachedif true, the new process will have its own window
bLaunchHiddenif true, the new process will be minimized in the task bar
bLaunchReallyHiddenif true, the new process will not have a window or be in the task bar
OutProcessIdif non-NULL, this will be filled in with the ProcessId
PriorityModifier-2 idle, -1 low, 0 normal, 1 high, 2 higher
OptionalWorkingDirectoryDirectory to start in when running the program, or NULL to use the current working directory
PipeWriteOptional HANDLE to pipe for redirecting output
返回
The process handle for use in other process functions

◆ CreateRunnableThread()

static class FRunnableThread * FGenericPlatformProcess::CreateRunnableThread ( )
static

Creates the platform-specific runnable thread.

This should only be called from FRunnableThread::Create.

返回
The newly created thread

◆ CreateSynchEvent()

static class FEvent * FGenericPlatformProcess::CreateSynchEvent ( bool  bIsManualReset = false)
static

Creates a new event.

参数
bIsManualResetWhether the event requires manual reseting or not.
返回
A new event, or nullptr none could be created.
参见
GetSynchEventFromPool, ReturnSynchEventToPool

◆ Daemonize()

static bool FGenericPlatformProcess::Daemonize ( )
static

Makes process run as a system service (daemon), i.e.

detaches it from whatever user session it was initially run from.

返回
true if successful, false otherwise.

◆ DeleteInterprocessSynchObject()

static bool FGenericPlatformProcess::DeleteInterprocessSynchObject ( FSemaphore *  Object)
static

Deletes an interprocess synchronization object.

参数
Objectobject to destroy.

◆ ExecElevatedProcess()

static bool FGenericPlatformProcess::ExecElevatedProcess ( const TCHAR *  URL,
const TCHAR *  Params,
int32 *  OutReturnCode 
)
static

Executes a process as administrator, requesting elevation as necessary.

This call blocks until the process has returned.

◆ ExecProcess()

static bool FGenericPlatformProcess::ExecProcess ( const TCHAR *  URL,
const TCHAR *  Params,
int32 *  OutReturnCode,
FString *  OutStdOut,
FString *  OutStdErr,
const TCHAR *  OptionalWorkingDirectory = NULL 
)
static

Executes a process, returning the return code, stdout, and stderr.

This call blocks until the process has returned.

参数
OutReturnCodemay be 0
OutStdOutmay be 0
OutStdErrmay be 0 @OptionalWorkingDirectory may be 0

◆ ExecutableName()

static const TCHAR * FGenericPlatformProcess::ExecutableName ( bool  bRemoveExtension = true)
static

Return the name of the currently running executable

参数
bRemoveExtensiontrue to remove the extension of the executable name, false to leave it intact
返回
Name of the currently running executable

◆ ExecutablePath()

static const TCHAR * FGenericPlatformProcess::ExecutablePath ( )
static

Return the path to the currently running executable

返回
Path of the currently running executable

◆ ExploreFolder()

static void FGenericPlatformProcess::ExploreFolder ( const TCHAR *  FilePath)
static

Attempt to "explore" the folder specified by the provided file path

参数
FilePathFile path specifying a folder to explore

◆ GenerateApplicationPath()

static FString FGenericPlatformProcess::GenerateApplicationPath ( const FString &  AppName,
EBuildConfiguration  BuildConfiguration 
)
static

Generates the path to the specified application or game.

The application must reside in the Engine's binaries directory. The returned path is relative to this executable's directory.For example, calling this method with "UE4" and EBuildConfiguration::Debug on Windows 64-bit will generate the path "../Win64/UE4Editor-Win64-Debug.exe"

参数
AppNameThe name of the application or game.
BuildConfigurationThe build configuration of the game.
返回
The generated application path.

◆ GetApplicationName()

static FString FGenericPlatformProcess::GetApplicationName ( uint32  ProcessId)
static

Returns the Name of process given by the PID.

Returns Empty string "" if PID not found.

◆ GetCurrentCoreNumber()

static uint32 FGenericPlatformProcess::GetCurrentCoreNumber ( )
static

Retrieves the current hardware CPU core

返回
the current hardware core.

◆ GetCurrentProcessId()

static uint32 FGenericPlatformProcess::GetCurrentProcessId ( )
static

Retrieves the ProcessId of this process.

返回
the ProcessId of this process.

◆ GetGameBundleId()

static FString FGenericPlatformProcess::GetGameBundleId ( )
static

Retrieves the platform-specific bundle identifier or package name of the game

返回
The game's bundle identifier or package name.

◆ GetModuleExtension()

static const TCHAR * FGenericPlatformProcess::GetModuleExtension ( )
static

Return the extension of dynamic library

返回
Extension of dynamic library.
参见
GetModulePrefix, GetModulesDirectory

◆ GetModulePrefix()

static const TCHAR * FGenericPlatformProcess::GetModulePrefix ( )
static

Return the prefix of dynamic library (e.g.

lib)

返回
The prefix string.
参见
GetModuleExtension, GetModulesDirectory

◆ GetModulesDirectory()

static const FString FGenericPlatformProcess::GetModulesDirectory ( )
static

Used only by platforms with DLLs, this gives the full path to the main directory containing modules

返回
The path to the directory.
参见
GetModulePrefix, GetModuleExtension

◆ GetSynchEventFromPool()

static class FEvent * FGenericPlatformProcess::GetSynchEventFromPool ( bool  bIsManualReset = false)
static

Gets an event from the pool or creates a new one if necessary.

参数
bIsManualResetWhether the event requires manual reseting or not.
返回
An event, or nullptr none could be created.
参见
CreateSynchEvent, ReturnSynchEventToPool

◆ IsFirstInstance()

static bool FGenericPlatformProcess::IsFirstInstance ( )
static

Checks if we're the first instance.

An instance can become first if the previous first instance quits before it.

◆ IsProcRunning()

static bool FGenericPlatformProcess::IsProcRunning ( FProcHandle &  ProcessHandle)
static

Returns true if the specified process is running

参数
ProcessHandlehandle returned from FPlatformProcess::CreateProc
返回
true if the process is still running

◆ LaunchFileInDefaultExternalApplication()

static void FGenericPlatformProcess::LaunchFileInDefaultExternalApplication ( const TCHAR *  FileName,
const TCHAR *  Parms = NULL,
ELaunchVerb::Type  Verb = ELaunchVerb::Open 
)
static

Attempt to launch the provided file name in its default external application.

Similar to FPlatformProcess::LaunchURL, with the exception that if a default application isn't found for the file, the user will be prompted with an "Open With..." dialog.

参数
FileNameName of the file to attempt to launch in its default external application
ParmsOptional parameters to the default application
VerbOptional verb to use when opening the file, if it applies for the platform.

◆ LaunchURL()

static void FGenericPlatformProcess::LaunchURL ( const TCHAR *  URL,
const TCHAR *  Parms,
FString *  Error 
)
static

Launch a uniform resource locator (i.e.

http://www.epicgames.com/unreal). This is expected to return immediately as the URL is launched by another task. The URL param must already be a valid URL. If you're looking for code to properly escape a URL fragment, use FGenericPlatformHttp::UrlEncode.

◆ NewInterprocessSynchObject() [1/2]

static FSemaphore * FGenericPlatformProcess::NewInterprocessSynchObject ( const FString &  Name,
bool  bCreate,
uint32  MaxLocks = 1 
)
static

Creates or opens an interprocess synchronization object.

参数
Namename (so we can use it across processes).
bCreateIf true, the function will try to create, otherwise will try to open existing.
MaxLocksMaximum amount of locks that the semaphore can have (pass 1 to make it act as mutex).
返回
Pointer to heap allocated semaphore object. Caller is responsible for deletion.

◆ NewInterprocessSynchObject() [2/2]

static FSemaphore * FGenericPlatformProcess::NewInterprocessSynchObject ( const TCHAR *  Name,
bool  bCreate,
uint32  MaxLocks = 1 
)
static

Creates or opens an interprocess synchronization object.

参数
Namename (so we can use it across processes).
bCreateIf true, the function will try to create, otherwise will try to open existing.
MaxLocksMaximum amount of locks that the semaphore can have (pass 1 to make it act as mutex).
返回
Pointer to heap allocated semaphore object. Caller is responsible for deletion.

◆ OpenProcess()

static FProcHandle FGenericPlatformProcess::OpenProcess ( uint32  ProcessID)
static

Opens an existing process.

参数
ProcessIDThe process id of the process for which we want to obtain a handle.
返回
The process handle for use in other process functions

◆ PopDllDirectory()

static FORCEINLINE void FGenericPlatformProcess::PopDllDirectory ( const TCHAR *  Directory)
inlinestatic

Unsets a directory to look for DLL files.

The same directory must be passed in as the Push call to validate

◆ PushDllDirectory()

static FORCEINLINE void FGenericPlatformProcess::PushDllDirectory ( const TCHAR *  Directory)
inlinestatic

Set a directory to look for DLL files.

NEEDS to have a Pop call when complete

◆ ReadPipe()

static FString FGenericPlatformProcess::ReadPipe ( void *  ReadPipe)
static

Reads all pending data from an anonymous pipe, such as STDOUT or STDERROR of a process.

参数
PipeThe handle to the pipe to read from.
返回
A string containing the read data.
参见
ClosePipe, CreatePipe

◆ ReadPipeToArray()

static bool FGenericPlatformProcess::ReadPipeToArray ( void *  ReadPipe,
TArray< uint8 > &  Output 
)
static

Reads all pending data from an anonymous pipe, such as STDOUT or STDERROR of a process.

参数
PipeThe handle to the pipe to read from.
OutputThe data read.
返回
true if successful (i.e. any data was read)
参见
ClosePipe, CreatePipe

◆ ReturnSynchEventToPool()

static void FGenericPlatformProcess::ReturnSynchEventToPool ( FEvent *  Event)
static

Returns an event to the pool.

参数
EventThe event to return.
参见
CreateSynchEvent, GetSynchEventFromPool

◆ SetProcessLimits()

static bool FGenericPlatformProcess::SetProcessLimits ( EProcessResource::Type  Resource,
uint64  Limit 
)
inlinestatic

Sets the process limits.

参数
Resourceone of process resources.
Limitthe maximum amount of the resource (for some OS, this means both hard and soft limits).
返回
true on success, false otherwise.

◆ SetThreadAffinityMask()

static void FGenericPlatformProcess::SetThreadAffinityMask ( uint64  AffinityMask)
static

Change the thread processor affinity

参数
AffinityMaskA bitfield indicating what processors the thread is allowed to run on.

◆ SetThreadName()

static void FGenericPlatformProcess::SetThreadName ( const TCHAR *  ThreadName)
inlinestatic

Helper function to set thread name of the current thread.

参数
ThreadNameName to set

◆ ShaderWorkingDir()

static const FString FGenericPlatformProcess::ShaderWorkingDir ( )
static

Get the shader working directory.

返回
The path to the directory.

◆ SupportsMultithreading()

static bool FGenericPlatformProcess::SupportsMultithreading ( )
static

Gets whether this platform can use multiple threads.

返回
true if the platform can use multiple threads, false otherwise.

◆ TerminateProc()

static void FGenericPlatformProcess::TerminateProc ( FProcHandle &  ProcessHandle,
bool  KillTree = false 
)
static

Terminates a process

参数
ProcessHandlehandle returned from FPlatformProcess::CreateProc
KillTreeWhether the entire process tree should be terminated.

◆ UserDir()

static const TCHAR * FGenericPlatformProcess::UserDir ( )
static

Get user directory.

NOTE: Only one return value is valid at a time!

◆ UserName()

static const TCHAR * FGenericPlatformProcess::UserName ( bool  bOnlyAlphaNumeric = true)
static

Get user name.

NOTE: Only one return value is valid at a time!

◆ UserSettingsDir()

static const TCHAR * FGenericPlatformProcess::UserSettingsDir ( )
static

Get the user settings directory.

NOTE: Only one return value is valid at a time!

◆ UserTempDir()

static const TCHAR * FGenericPlatformProcess::UserTempDir ( )
static

Get the user temporary directory.

NOTE: Only one return value is valid at a time!

◆ WaitAndFork()

static EWaitAndForkResult FGenericPlatformProcess::WaitAndFork ( )
static

Waits for process signals and forks child processes.

WaitAndFork stalls the invoking process and forks child processes when signals are sent to it from an external source. Forked child processes will provide a return value of EWaitAndForkResult::Child, while the parent process will not return until IsEngineExitRequested() is true (EWaitAndForkResult::Parent) or there was an error (EWaitAndForkResult::Error) The signal the parent process expects is platform-specific (i.e. SIGRTMIN+1 on Linux).

◆ WaitForProc()

static void FGenericPlatformProcess::WaitForProc ( FProcHandle &  ProcessHandle)
static

Waits for a process to stop

参数
ProcessHandlehandle returned from FPlatformProcess::CreateProc

◆ WritePipe() [1/2]

static bool FGenericPlatformProcess::WritePipe ( void *  WritePipe,
const FString &  Message,
FString *  OutWritten = nullptr 
)
static

Sends the message to process through pipe

参数
WritePipePipe for writing.
MessageThe message to be written.
OutWrittenOptional parameter to know how much of the string written.
返回
True if all bytes written successfully.
参见
CreatePipe, ClosePipe, ReadPipe

◆ WritePipe() [2/2]

static bool FGenericPlatformProcess::WritePipe ( void *  WritePipe,
const uint8 *  Data,
const int32  DataLength,
int32 *  OutDataLength = nullptr 
)
static

Sends data to process through pipe

参数
WritePipePipe for writing.
DataThe data to be written.
DataLengthhow many bytes to write.
OutDataLengthOptional parameter to know how many bytes had been written.
返回
True if all bytes written successfully.
参见
CreatePipe, ClosePipe, ReadPipe

◆ Yield()

static FORCEINLINE void FGenericPlatformProcess::Yield ( )
inlinestatic

Tells the processor to pause for implementation-specific amount of time.

Is used for spin-loops to improve the speed at which the code detects the release of the lock and power-consumption.


该结构体的文档由以下文件生成: