Example:
version (linux) {
import core.sys.linux.unistd : getpid;
assert(pidExistsNoGC(getpid()));
}bool pidExistsNoGC(int pid) @nogc nothrow @safeChecks if a process exists without GC allocation.
This function provides a @nogc, @safe, nothrow way to check if a process with the given PID exists.
pid | The process ID to check. |
Example:
version (linux) {
import core.sys.linux.unistd : getpid;
assert(pidExistsNoGC(getpid()));
}