关于Process.WaitForExit();造成程序死锁的问题(测试)

 1  try
 2             {
 3                 Process pp = Process.Start(processStartInfo);
 4                 string output = pp.StandardOutput.ReadToEnd();
 5                 pp.WaitForExit();
 6                 pp.Close();
 7                 MessageBox.Show(output);
 8             }
 9             catch (Exception ex)
10             {
11                 MessageBox.Show(ex.Message);
12             }

补充:

WaitForExit();//有一个重载;
posted @ 2013-09-05 10:53  黄山红塔  阅读(934)  评论(0编辑  收藏  举报