NET 11 introduces major improvements to the System.Diagnostics.Process API. New high-level methods like Process.RunAndCaptureText, Process.Run, and Process.StartAndForget simplify common process management tasks. Deadlock-free output capture is achieved via multiplexing both stdout and stderr simultaneously. New ProcessStartInfo properties include InheritedHandles for controlled handle inheritance, KillOnParentExit to terminate child processes when the parent exits, and StartDetached for long-running background processes. A lightweight SafeProcessHandle-based API surface improves NativeAOT trimmability by up to 32%. Performance highlights include 98x faster process creation on Apple Silicon via posix_spawn, 1.8x throughput improvement on Windows for parallel process starts, 30-50% fewer memory allocations on Unix, and 4.5x smaller NativeAOT binaries in some scenarios.
Table of contents
Summary Copy linkCapturing process output without deadlocks Copy linkHandle inheritance Copy linkRedirecting standard handles Copy linkLifetime management Copy linkSafeProcessHandle Copy linkNotable performance improvements Copy linkCall to Action Copy linkSort: