I am opening a System.Diagnostic.Process to read the stdout from a process and I would like to be able to interrupt it after a certain elapsed time.
try
{
output = outputStream.ReadToEnd();
}
catch (ThreadInterruptedException e)
{
return;
}
That doesn't work since the thread is in the ReadToEnd() method. I attempted to close the stream from the main thread, hoping that'd EOF the Read method, but that didn't work either.