carb::this_process::getIdCached

Defined in carb/process/Util.h

inline process::ProcessId carb::this_process::getIdCached()

Get the ID of the currently executing process.

Note

Linux: This value is cached, so this can be unsafe if you are using fork() or clone() without calling exec() after. This should be safe if you’re only using carb::launcher::ILauncher to launch processes.

Returns

The current ID of the process.