private ProcessExited ( object sender, EventArgs e ) : void | ||
sender | object | |
e | EventArgs | |
return | void |
private void ProcessExited(object sender, EventArgs e)
{
if (Exited != null)
{
//The process is exited already, but this command waits also until all output is recieved.
//Only WaitForExit when someone is conntected to the exited event. For some reason a
//null reference is thrown sometimes when staging/unstaging in the commit dialog when
//we wait for exit, probably a timing issue...
Process.WaitForExit();
Exited(this, e);
}
Process = null;
}