Example:
auto allPids = pids();
writeln("Total processes: ", allPids.length);Represents a system process.
This class provides access to process information and control operations. It handles PID reuse by tracking process creation time for identity verification.
Example:
auto proc = Process.current();
writeln("Process: ", proc.name());
writeln("PID: ", proc.pid());
writeln("Status: ", proc.status());NetConnection[] connections(string kind = "inet") @trustedGets network connections for this process.this(int pid)Creates a Process object for the given PID.CpuTimesCPU times for a process.MemoryInfoMemory information for a process.IoCountersI/O counters for a process.ThreadInfoThread information.OpenFileOpen file information.Gets all process IDs in the system.
This is an alias for allPids() to match the PLAN API.
Example:
auto allPids = pids();
writeln("Total processes: ", allPids.length);Result of process enumeration with error information.
This struct contains successfully enumerated processes along with information about any failures that occurred during enumeration.
Process iterator range.
This struct provides a range interface for iterating over processes.
ProcessRange processIter(string[] attrs = null, bool preload = false) @safeCreates a process iterator.