Issue #10: implement worker process launcher

This commit is contained in:
Joseph Doherty
2026-04-26 16:38:32 -04:00
parent 3b3e41acf4
commit c1188c6957
20 changed files with 946 additions and 0 deletions
@@ -0,0 +1,22 @@
using System.Diagnostics;
namespace MxGateway.Server.Workers;
public sealed class SystemWorkerProcessFactory : IWorkerProcessFactory
{
public IWorkerProcess Start(ProcessStartInfo startInfo)
{
Process process = new()
{
StartInfo = startInfo,
};
if (!process.Start())
{
process.Dispose();
throw new InvalidOperationException("Worker process failed to start.");
}
return new SystemWorkerProcess(process);
}
}