thisProcessID
fn
int thisProcessID() @property @trusted nothrow @nogcReturns the process ID of the current process, which is guaranteed to be unique on the system.
Example:
writefln("Current process ID: %d", thisProcessID);