Based on other questions, I'm using System.Diagnostics.Process
to Start
and Kill
a process:
this.childProcess.Kill();
this.childProcess.WaitForExit();
this.childProcess.Close();
I would assume that WaitForExit
deals with the asynchronous nature of the Kill
command, however the process in question (perl.exe) refuses to die. Instead it lingers for some period of time.
This "period of time" is causing a race condition. Is there anyway I can make sure this process actually dies?