Repository navigation
LittleForker 4.0.0
This is a major release with breaking API changes, new DI-friendly hosted services, and security hardening.
Breaking Changes
ProcessSupervisorconstructor replaced — The multi-parameter constructor is removed. UseProcessSupervisorSettingsinstead:var settings = new ProcessSupervisorSettings(workingDirectory, processPath) { Arguments = "...", EnvironmentVariables = ..., CaptureStdErr = true }; var supervisor = new ProcessSupervisor(settings, loggerFactory);
ProcessRunTyperemoved — TheSelfTerminating/NonTerminatingdistinction is gone. All processes are supervised uniformly.ExitedUnexpectedlystate removed — The state machine is simplified. Processes that exit with a non-zero code enterExitedWithErrorregardless of how they were stopped.SelfTerminatingProcesssample project removed.- Nonce wire protocol changed — Security nonces are now validated over the wire protocol (
EXIT {nonce}), not embedded in the pipe name.GetPipeName(int, string)is removed.
New Features
CooperativeShutdownHostedService— ABackgroundServicethat listens for cooperative shutdown signals and callsIHostApplicationLifetime.StopApplication(). Register via DI:services.AddCooperativeShutdownHostedService(); // or with nonce: services.AddCooperativeShutdownHostedService(o => o.Nonce = "shared-secret");
WatchParentProcessHostedService— ABackgroundServicethat monitors a parent process and stops the application when it exits:services.AddWatchParentProcessHostedService(o => o.ParentProcessId = parentPid);
NonTerminatingProcessconverted to Generic Host — The sample child process now usesMicrosoft.Extensions.Hostinginstead of Serilog.
Security
- Pipe ACLs on Windows — Named pipe servers now restrict access to the current user via
PipeSecurity, preventing other local users from sending EXIT signals. - Pipe squatting prevention — Pipe servers are limited to 1 instance, preventing malicious processes from creating competing server instances.
- Nonce no longer discoverable — The security nonce is validated over the wire protocol instead of being embedded in the (enumerable) pipe name.
Infrastructure
- Targets .NET 10
- xUnit v3 with Microsoft Testing Platform
TreatWarningsAsErrorsandEnforceCodeStyleInBuildenabled.editorconfigandshared.propsfor consistent code style- File-scoped namespaces, nullable annotations, sealed classes throughout
Full Changelog: v3.0.1...v4.0.0