Repository navigation
Releases
Releases · damianh/LittleForker
Release 4.0.0
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
General improvements.
- [Breaking]
ProcessSupervisor.Start()is async. - Add
ExitKilledstate for when a process was killed when it didn't shut down within time out (or if no timeout supplied). #96 - When non terminating process shuts itself down after a signal but exits with a non-zero exit code, the state is
ExitWithErrorinstead ofExitSuccessfully. #105 - Improved multi-threaded handling in
ProcessSupervisor. #96 - Supports
netstandard2.0,netcoreapp2.1,netcoreapp3.1,net5.0#96
Thanks to @pgermishuys for contributions and feedback!
Patch release
- Log a warning of the timeout before killing the process #103
- Kill the process if it's exceeded it's allotted time to shutdown #97
Thanks to @pgermishuys for the contributions!
v2.0.0
Bug fixes
Initial Release
Allows overwriting of environment variables (#6) * allows overwriting of environment variables * fix build
Preview release
Seems this does have utility after all...