madelson / MedallionShell

A .NET library simplifying the execution and chaining of processes
MIT License
415 stars 32 forks source link

Feature Process.Exited callback #72

Closed imtrobin closed 4 years ago

imtrobin commented 4 years ago

Hi, isi there a callback for when process has exit? Couldn't see one

madelson commented 4 years ago

Yes! You can use the Command's task for this:

var command = Command.Run(...);
command.Task.ContinueWith(t => /* do something once the process has finished */);