Skip to content

Releases

Release 4.0.0

Choose a tag to compare

@github-actions github-actions released this 25 Apr 11:53

LittleForker 4.0.0

This is a major release with breaking API changes, new DI-friendly hosted services, and security hardening.

Breaking Changes

  • ProcessSupervisor constructor replaced — The multi-parameter constructor is removed. Use ProcessSupervisorSettings instead:
    var settings = new ProcessSupervisorSettings(workingDirectory, processPath)
    {
        Arguments = "...",
        EnvironmentVariables = ...,
        CaptureStdErr = true
    };
    var supervisor = new ProcessSupervisor(settings, loggerFactory);
  • ProcessRunType removed — The SelfTerminating / NonTerminating distinction is gone. All processes are supervised uniformly.
  • ExitedUnexpectedly state removed — The state machine is simplified. Processes that exit with a non-zero code enter ExitedWithError regardless of how they were stopped.
  • SelfTerminatingProcess sample 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 — A BackgroundService that listens for cooperative shutdown signals and calls IHostApplicationLifetime.StopApplication(). Register via DI:
    services.AddCooperativeShutdownHostedService();
    // or with nonce:
    services.AddCooperativeShutdownHostedService(o => o.Nonce = "shared-secret");
  • WatchParentProcessHostedService — A BackgroundService that monitors a parent process and stops the application when it exits:
    services.AddWatchParentProcessHostedService(o => o.ParentProcessId = parentPid);
  • NonTerminatingProcess converted to Generic Host — The sample child process now uses Microsoft.Extensions.Hosting instead 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
  • TreatWarningsAsErrors and EnforceCodeStyleInBuild enabled
  • .editorconfig and shared.props for consistent code style
  • File-scoped namespaces, nullable annotations, sealed classes throughout

Full Changelog: v3.0.1...v4.0.0

General improvements.

Choose a tag to compare

@damianh damianh released this 25 Sep 13:48
  • [Breaking] ProcessSupervisor.Start() is async.
  • Add ExitKilled state 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 ExitWithError instead of ExitSuccessfully. #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

Choose a tag to compare

@damianh damianh released this 25 Sep 12:15
438d3d7
  • 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

Choose a tag to compare

@damianh damianh released this 14 Apr 17:01
  • [Breaking Change] #36 Replace LibLog with Microsoft.Extenstions.Logging
  • #38 Replaced licence with Apache-2.0

Bug fixes

Choose a tag to compare

@damianh damianh released this 02 Jan 13:55
  1. [Bug] Fault tolerant pipe connections #34
  2. [Enhancement] Deploy CI packages to feedz.io #23

https://www.nuget.org/packages/LittleForker/1.0.1

Initial Release

Choose a tag to compare

@damianh damianh released this 08 Mar 15:57
3bed5d1
Allows overwriting of environment variables (#6)

* allows overwriting of environment variables

* fix build

Preview release

Choose a tag to compare

@damianh damianh released this 11 Dec 20:42

Seems this does have utility after all...