UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UnixCommonStartup.cpp File Reference
#include "UnixCommonStartup.h"
#include "Misc/OutputDeviceRedirector.h"
#include "Misc/OutputDeviceError.h"
#include "Misc/FeedbackContext.h"
#include "HAL/ExceptionHandling.h"
#include "Unix/UnixPlatformCrashContext.h"
#include "Modules/ModuleInterface.h"
#include "Modules/ModuleManager.h"
#include "Misc/EngineVersion.h"
#include "HAL/PlatformApplicationMisc.h"
#include <locale.h>
#include <sys/resource.h>

Classes

class  FUnixCommonStartupModule
 

Functions

int32 GuardedMain (const TCHAR *CmdLine)
 
void LaunchStaticShutdownAfterError ()
 
void CommonUnixCrashHandler (const FGenericCrashContext &GenericContext)
 UE_BUILD_SHIPPING && WITH_ENGINE.
 
bool SetResourceLimit (int Resource, rlim_t DesiredLimit, bool bIncreaseOnly)
 
int CommonUnixMain (int argc, char *argv[], int(*RealMain)(const TCHAR *CommandLine), void(*AppExitCallback)())
 CommonUnixMain - executes common startup code for Unix programs/engine.
 
 IMPLEMENT_MODULE (FUnixCommonStartupModule, UnixCommonStartup)
 

Function Documentation

◆ CommonUnixCrashHandler()

void CommonUnixCrashHandler ( const FGenericCrashContext GenericContext)

UE_BUILD_SHIPPING && WITH_ENGINE.

Game-specific crash reporter

This is the last place to gather memory stats

◆ CommonUnixMain()

int CommonUnixMain ( int  argc,
char argv[],
int(*)(const TCHAR *CommandLine RealMain,
void(*)()  AppExitCallback = nullptr 
)

CommonUnixMain - executes common startup code for Unix programs/engine.

Parameters
argc- number of arguments in argv[]
argv- array of arguments
RealMain- the next main routine to call in chain
AppExitCallback- workaround for Launch module that needs to call FEngineLoop::AppExit() at certain point
Returns
error code to return to the OS

◆ GuardedMain()

int32 GuardedMain ( const TCHAR CmdLine)
extern

◆ IMPLEMENT_MODULE()

IMPLEMENT_MODULE ( FUnixCommonStartupModule  ,
UnixCommonStartup   
)

◆ LaunchStaticShutdownAfterError()

void LaunchStaticShutdownAfterError ( )
extern

◆ SetResourceLimit()

bool SetResourceLimit ( int  Resource,
rlim_t  DesiredLimit,
bool  bIncreaseOnly 
)

Sets (soft) limit on a specific resource

Parameters
Resource- one of RLIMIT_* values
DesiredLimit- desired value
bIncreaseOnly- avoid changing the limit if current value is sufficient