public void WaitForExit(Process process) { var processWrapper = new ProcessWrapper(process); WaitForExit(processWrapper); }
// This is pure async process execution public async Task<int> ExecuteAsync(ITracer tracer, string arguments, Stream output, Stream error, Stream input = null, IdleManager idleManager = null) { using (GetProcessStep(tracer, arguments)) { using (Process process = CreateProcess(arguments)) { var wrapper = new ProcessWrapper(process); int exitCode = await wrapper.Start(output, error, input, idleManager ?? new IdleManager(IdleTimeout, tracer)); tracer.TraceProcessExitCode(process); return exitCode; } } }