Add a 10 second timeout to ensure that we don't lock up if we never get to the
process entry point. llvm-svn: 133598
This commit is contained in:
parent
1da6f9d7f1
commit
1a38ea763a
|
@ -2060,9 +2060,19 @@ Process::Launch
|
|||
else
|
||||
{
|
||||
EventSP event_sp;
|
||||
StateType state = WaitForProcessStopPrivate(NULL, event_sp);
|
||||
TimeValue timeout_time;
|
||||
timeout_time = TimeValue::Now();
|
||||
timeout_time.OffsetWithSeconds(10);
|
||||
StateType state = WaitForProcessStopPrivate(&timeout_time, event_sp);
|
||||
|
||||
if (state == eStateStopped || state == eStateCrashed)
|
||||
if (state == eStateInvalid || event_sp.get() == NULL)
|
||||
{
|
||||
// We were able to launch the process, but we failed to
|
||||
// catch the initial stop.
|
||||
SetExitStatus (0, "failed to catch stop after launch");
|
||||
Destroy();
|
||||
}
|
||||
else if (state == eStateStopped || state == eStateCrashed)
|
||||
{
|
||||
|
||||
DidLaunch ();
|
||||
|
|
Loading…
Reference in New Issue