[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

Kamil Rytarowski via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 3 08:10:48 PDT 2017


krytarowski added inline comments.


================
Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:85
+  int wstatus;
+  ::pid_t wpid = llvm::sys::RetryAfterSignal(-1, ::waitpid, pid, &wstatus, 0);
+  assert(wpid == pid);
----------------
We can set BSD specific: `-1` -> `WAIT_ANY`.

I verified that it exists on NetBSD, FreeBSD and OpenBSD.


================
Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:87
+  assert(wpid == pid);
+  (void)wpid;
+  if (wpid != pid || !WIFSTOPPED(wstatus)) {
----------------
Is this line needed?


================
Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:738
   ::pid_t wait_pid =
       llvm::sys::RetryAfterSignal(-1, waitpid, GetID(), &status, WALLSIG | WNOHANG);
 
----------------
We can set BSD specific: -1 -> WAIT_ANY.


https://reviews.llvm.org/D33778





More information about the lldb-commits mailing list