If you started some process in your code, you can capture the even when it is stopped, but, normally, you would need to handle it in a separate thread. This is not very expensive even if you want to track several external processes requiring a separate tracking thread per process, because most of the time such thread would be in the wait state, wasting no CPU time.
It could looks like this:
using System.Diagnostics;
void SomeThreadStartMethod() {
Process someExternalProcess = Process.Start("...", "...");
someExternalProcess.WaitForExit();
}
If you are not starting your process in your server, you still can get the list of processes, choose one by some criteria and use a references to it to do the same wait. Please see:
http://msdn.microsoft.com/en-us/library/system.diagnostics.process%28v=vs.110%29.aspx[
^].
—SA