[Lldb-commits] [lldb] r149622 - /lldb/trunk/tools/debugserver/source/DNB.cpp

Greg Clayton gclayton at apple.com
Thu Feb 2 11:23:23 PST 2012


Author: gclayton
Date: Thu Feb  2 13:23:22 2012
New Revision: 149622

URL: http://llvm.org/viewvc/llvm-project?rev=149622&view=rev
Log:
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.


Modified:
    lldb/trunk/tools/debugserver/source/DNB.cpp

Modified: lldb/trunk/tools/debugserver/source/DNB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/DNB.cpp?rev=149622&r1=149621&r2=149622&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/DNB.cpp (original)
+++ lldb/trunk/tools/debugserver/source/DNB.cpp Thu Feb  2 13:23:22 2012
@@ -250,6 +250,10 @@
             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())





More information about the lldb-commits mailing list