thisProcessID

fnint thisProcessID() @property @trusted nothrow @nogc

Returns the process ID of the current process, which is guaranteed to be unique on the system.

Example:

writefln("Current process ID: %d", thisProcessID);