mgorny created this revision.
mgorny added reviewers: emaste, labath, krytarowski.
mgorny requested review of this revision.

Use PT_KILL to kill the stopped process.  This ensures that the process
termination is reported properly and fixes delay/error on killing it.


https://reviews.llvm.org/D89182

Files:
  lldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.cpp


Index: lldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.cpp
===================================================================
--- lldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.cpp
+++ lldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.cpp
@@ -404,12 +404,7 @@
     break;
   }
 
-  if (kill(GetID(), SIGKILL) != 0) {
-    error.SetErrorToErrno();
-    return error;
-  }
-
-  return error;
+  return PtraceWrapper(PT_KILL, m_pid);
 }
 
 Status NativeProcessFreeBSD::GetMemoryRegionInfo(lldb::addr_t load_addr,


Index: lldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.cpp
===================================================================
--- lldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.cpp
+++ lldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.cpp
@@ -404,12 +404,7 @@
     break;
   }
 
-  if (kill(GetID(), SIGKILL) != 0) {
-    error.SetErrorToErrno();
-    return error;
-  }
-
-  return error;
+  return PtraceWrapper(PT_KILL, m_pid);
 }
 
 Status NativeProcessFreeBSD::GetMemoryRegionInfo(lldb::addr_t load_addr,
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to