pidExistsNoGC

fnbool pidExistsNoGC(int pid) @nogc nothrow @safe

Checks 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.

Parameters

pidThe process ID to check.

Returns

true if the process exists, false otherwise.

Example:

version (linux) {
  import core.sys.linux.unistd : getpid;
  assert(pidExistsNoGC(getpid()));
}