The OpenD Programming Language

getpid

Returns the process ID of the calling process, which is guaranteed to be unique on the system. This call is always successful.

import core.thread.osthread;
version(Posix)
alias getpid = core.sys.posix.unistd.getpid

Examples

writefln("Current process id: %s", getpid());

Meta