From fb640c2d4cbeaa6e1be1e619c063f1074d289d74 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 2 Feb 2012 19:23:22 +0000 Subject: Kill our child process that we launch when we can't get the task_for_pid() otherwise we will have a launched process stopped at the entry point and it will get reparented when debugserver goes away and we won't be able to kill the process later. llvm-svn: 149622 --- lldb/tools/debugserver/source/DNB.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lldb/tools/debugserver/source/DNB.cpp') diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp index f60c26fab6d..1b8632eb717 100644 --- a/lldb/tools/debugserver/source/DNB.cpp +++ b/lldb/tools/debugserver/source/DNB.cpp @@ -250,6 +250,10 @@ DNBProcessLaunch (const char *path, if (processSP->Task().TaskPortForProcessID (launch_err) == TASK_NULL) { // We failed to get the task for our process ID which is bad. + // Kill our process otherwise it will be stopped at the entry + // point and get reparented to someone else and never go away. + kill (SIGKILL, pid); + if (err_str && err_len > 0) { if (launch_err.AsString()) -- cgit v1.2.3