The problem is the WaitForExit
call. This managed call will eventually bottom out in a native frame. When an Abort
call occurs while the thread is in native code nothing will actually happen until the thread returns to managed code. In this case the thread is waiting for the process to finish and hence won't actually return until you physically kill the process
Note: Even if the exception was thrown the catch
block won't actually catch it. The exception will be rethrown at the end of the block. You need to catch it and call the ResetAbort
method