Browse Source

Debugger: ignore "Process was terminated" error when trying to terminate the process.

pull/507/head
Daniel Grunwald 11 years ago
parent
commit
d8fd301d25
  1. 12
      src/AddIns/Debugger/Debugger.Core/Process.cs

12
src/AddIns/Debugger/Debugger.Core/Process.cs

@ -527,8 +527,16 @@ namespace Debugger
System.Threading.Thread.Sleep(0); System.Threading.Thread.Sleep(0);
// Stop&terminate - both must be called // Stop&terminate - both must be called
corProcess.Stop(uint.MaxValue); try {
corProcess.Terminate(0); corProcess.Stop(uint.MaxValue);
corProcess.Terminate(0);
} catch (COMException ex) {
if (ex.ErrorCode == unchecked((int)0x80131301)) {
// COMException (0x80131301): Process was terminated.
} else {
throw;
}
}
this.TerminateCommandIssued = true; this.TerminateCommandIssued = true;
// Do not mark the process as exited // Do not mark the process as exited

Loading…
Cancel
Save