Implement killing the debugged team on quitting a TeamDebugger, the obviuos

way... thanks Ingo! Seems to work just fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31204 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2009-06-23 13:09:50 +00:00
parent b9563a6fd9
commit 4922427769
2 changed files with 7 additions and 6 deletions
+6 -6
View File
@@ -36,7 +36,8 @@ TeamDebugger::TeamDebugger()
fWorker(NULL),
fDebugEventListener(-1),
fTeamWindow(NULL),
fTerminating(false)
fTerminating(false),
fKillTeamOnQuit(false)
{
}
@@ -55,6 +56,9 @@ TeamDebugger::~TeamDebugger()
if (fDebugEventListener >= 0)
wait_for_thread(fDebugEventListener, NULL);
if (fKillTeamOnQuit && fTeam != NULL)
kill_team(fTeam->ID());
delete fDebuggerInterface;
delete fWorker;
delete fDebugModel;
@@ -345,11 +349,7 @@ TeamDebugger::TeamWindowQuitRequested(TeamWindow* window)
switch (alert->Go()) {
case 0:
// TODO: Implement killing the team.
alert = new BAlert("TODO", "That is not nice and I won't do it "
"either! Test failed. Nice to know how you think about these "
"matters.", "Ugh!");
alert->Go();
fKillTeamOnQuit = true;
break;
case 1:
return false;
+1
View File
@@ -124,6 +124,7 @@ private:
thread_id fDebugEventListener;
TeamWindow* fTeamWindow;
volatile bool fTerminating;
bool fKillTeamOnQuit;
};
#endif // TEAM_DEBUGGER_H