これがスタックトレースです
Message :Thread was being aborted.
at System.Threading.WaitHandle.WaitOneNative(SafeWaitHandle waitHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne(Int64 timeout, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne(Int32 millisecondsTimeout, Boolean exitContext)
at System.Diagnostics.Process.WaitForExit(Int32 milliseconds)
コードは次のとおりです。
[WebMethod]
public Double executeAsJob()
{
myThread = new Thread(new ParameterizedThreadStart(runThread));
myThread.Start();
return RUNNING;
}
public void runThread() {
try {
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = ...;
proc.StartInfo.Arguments = ...;
proc.StartInfo.UseShellExecute = false;
proc.Start();
proc.WaitForExit(); // <-- THIS line throws the exception
// Save exit code
iResult = proc.ExitCode;
} catch (Exception e) { ... }
}
...これに関するアイデアはありますか?