以下代码无法超时。我想要读取进程的输出,即使我必须关闭它。
var proc = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = '"' + filepath + '"',
Arguments = execArgs,
UseShellExecute = false,
RedirectStandardOutput = true,
CreateNoWindow = true
}
};
proc.Start();
string poutput = proc.StandardOutput.ReadToEnd();
bool bl = proc.WaitForExit(0 * 60 * 1000);https://stackoverflow.com/questions/50826212
复制相似问题