Tyrrrz / CliWrap

Library for running command-line processes
MIT License
4.39k stars 268 forks source link

Getting process start time throws "Cannot process request because the process (84391) has exited" #93

Closed zhenlinyang closed 4 years ago

zhenlinyang commented 4 years ago

Unhandled exception. System.AggregateException: One or more errors occurred. (Cannot process request because the process (84391) has exited.) ---> System.InvalidOperationException: Cannot process request because the process (84391) has exited. at System.Diagnostics.Process.ThrowIfExited(Boolean refresh) at System.Diagnostics.Process.EnsureState(State state) at System.Diagnostics.Process.get_StartTimeCore() at System.Diagnostics.Process.get_StartTime() at CliWrap.Internal.ProcessEx.Start() at CliWrap.Command.ExecuteAsync(ProcessEx process, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.WaitAllCore(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.WaitAll(Task[] tasks)

Tyrrrz commented 4 years ago

Fuck, I was afraid this might happen. Note for the future: System.Diagnostics.Process sucks even more than I thought. Please revert to v3.2.0 for now, I'll fix this in the next release.

Tyrrrz commented 4 years ago

Also, just out of interest, you're running this on Linux/macOS, right?

zhenlinyang commented 4 years ago

Thank you. This error occurred in the macOS, my project is a cross-platform pipeline, and supports Windows, Linux, macOS.