一个webservice,要调用两个exe应用程序,代码如下:
System.Diagnostics.Process pExtractor = new System.Diagnostics.Process();  
pExtractor.StartInfo.FileName=@"C:\extractor";    
pExtractor.StartInfo.Arguments=strExporter;    pExtractor.Start();
if(pExtractor.HasExited)
{
  pExtractor.Kill();
}
System.Diagnostics.Process pImporter = new System.Diagnostics.Process();  
pImporter.StartInfo.FileName=@"C:\Importer";
pImporter.StartInfo.Arguments=strImporter;
pImporter.Start();
if(pImporter.HasExited)
{
pImporter.Kill();
}问题是,运行完第一个应用程序extractor后,我执行pExtractor.Kill() 结果就退出webservice了,没运行下面的exe程序。
如果我不pExtractor.Kill()的话,会不会一直占用资源呢?怎样解决这个矛盾?