ProcessKit 1.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ProcessKit --version 1.1.1
                    
NuGet\Install-Package ProcessKit -Version 1.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ProcessKit" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ProcessKit" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="ProcessKit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ProcessKit --version 1.1.1
                    
#r "nuget: ProcessKit, 1.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ProcessKit@1.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ProcessKit&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=ProcessKit&version=1.1.1
                    
Install as a Cake Tool

ProcessKit

Cross-platform child process lifetime management for .NET.

ProcessKit ensures that child processes are terminated when the parent exits — whether gracefully or via crash.

On Windows this is backed by kernel Job Objects; on Unix systems (Linux, macOS, FreeBSD) it uses POSIX process groups.

Requirements

  • .NET 10.0 or later
  • Windows 8+ / Linux / macOS / FreeBSD
  • AOT-compatible

Installation

Available on NuGet.org.

dotnet add package ProcessKit

Verifying the package

Each GitHub Release ships a SHA256SUMS file alongside the .nupkg / .snupkg. Download all three into the same directory, then:

sha256sum -c SHA256SUMS

Expected:

ProcessKit.<version>.nupkg: OK
ProcessKit.<version>.snupkg: OK

The package on NuGet.org carries a repository signature from nuget.org, which attributes it to the ProcessKit account. You can inspect it with dotnet nuget verify ProcessKit.<version>.nupkg --all.

Usage

using System.Diagnostics;
using ProcessKit;

// Children are terminated when the group is disposed —
// even if the parent process crashes.
using var group = new ProcessGroup();

var psi = new ProcessStartInfo("myworker", ["--arg"]) { UseShellExecute = false };
var worker = group.Start(psi);

// Kill on cancellation
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30));
var transient = group.Start(psi, cts.Token);

// Add an externally-started process to the group
var external = Process.Start(psi);
group.Add(external!);

// Runtime statistics (CPU time, peak memory, active count)
var stats = group.GetStats();
Console.WriteLine($"active={stats.ActiveProcessCount} cpu={stats.TotalCpuTime} peak={stats.PeakMemoryBytes}");

// Async dispose — non-blocking on Unix where SIGTERM/wait is involved
await using var asyncGroup = new ProcessGroup();
// ...

Running tests on Linux from Windows

The Unix code path (UnixProcessGroup, Libc) is exercised in CI on ubuntu-latest, but you can also run the suite locally against a Linux container — useful when changing native interop or shutdown semantics.

Requirements:

  • Rancher Desktop (or Docker Desktop) with the dockerd / moby engine enabled so docker is on PATH
  • PowerShell 7+
pwsh ./scripts/test-linux.ps1

The script mounts the repo into mcr.microsoft.com/dotnet/sdk:10.0 and runs dotnet build + dotnet test. The host's bin/ and obj/ folders are shadowed inside the container with anonymous volumes, so the Linux build neither sees the Windows IDE artifacts nor writes back into the host tree. A named volume (processkit-nuget) caches NuGet packages between runs.

Useful switches:

pwsh ./scripts/test-linux.ps1 -Filter "FullyQualifiedName~TerminateAll"
pwsh ./scripts/test-linux.ps1 -Configuration Debug -Rebuild

Changelog

See CHANGELOG.md for the version history.

License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.2 108 5/31/2026
1.3.1 97 5/31/2026
1.3.0 89 5/31/2026
1.2.0 146 5/19/2026
1.1.1 95 5/18/2026

### Changed
- Use latest git tag (or 0.0.0) as previous version baseline

### Removed
- Remove self-signed NuGet author signing