summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Target/Process.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 9f5a63ae9ce..9b0194951c1 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -2153,8 +2153,17 @@ Process::HandlePrivateEvent (EventSP &event_sp)
case NextEventAction::eEventActionRetry:
break;
case NextEventAction::eEventActionExit:
- // Handle Exiting Here...
-
+ // Handle Exiting Here. If we already got an exited event,
+ // we should just propagate it. Otherwise, swallow this event,
+ // and set our state to exit so the next event will kill us.
+ if (new_state != eStateExited)
+ {
+ // FIXME: should cons up an exited event, and discard this one.
+ SetExitStatus(0, m_next_event_action->GetExitString());
+ SetNextEventAction(NULL);
+ return;
+ }
+ SetNextEventAction(NULL);
break;
}
}
OpenPOWER on IntegriCloud