|
|
@ -157,12 +157,18 @@ namespace Debugger |
|
|
|
process.Start(); |
|
|
|
process.Start(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
internal object ProcessIsBeingCreatedLock = new object(); |
|
|
|
|
|
|
|
|
|
|
|
public Process Start(string filename, string workingDirectory, string arguments) |
|
|
|
public Process Start(string filename, string workingDirectory, string arguments) |
|
|
|
{ |
|
|
|
{ |
|
|
|
InitDebugger(GetProgramVersion(filename)); |
|
|
|
InitDebugger(GetProgramVersion(filename)); |
|
|
|
Process process = Process.CreateProcess(this, filename, workingDirectory, arguments); |
|
|
|
lock(ProcessIsBeingCreatedLock) { |
|
|
|
AddProcess(process); |
|
|
|
Process process = Process.CreateProcess(this, filename, workingDirectory, arguments); |
|
|
|
return process; |
|
|
|
// Expose a race conditon
|
|
|
|
|
|
|
|
System.Threading.Thread.Sleep(0); |
|
|
|
|
|
|
|
AddProcess(process); |
|
|
|
|
|
|
|
return process; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Process Attach(System.Diagnostics.Process existingProcess) |
|
|
|
public Process Attach(System.Diagnostics.Process existingProcess) |
|
|
|