labath marked 6 inline comments as done.
labath 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);
----------------
krytarowski wrote:
> We can set BSD specific: `-1` -> `WAIT_ANY`.
> 
> I verified that it exists on NetBSD, FreeBSD and OpenBSD.
I think that's semantically incorrect, WAIT_ANY means "any process" when used 
in the pid argument of waitpid. The -1 here is the "failure value" returned by 
waitpid, and that one is documented as -1 even on netbsd.


================
Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:87
+  assert(wpid == pid);
+  (void)wpid;
+  if (wpid != pid || !WIFSTOPPED(wstatus)) {
----------------
krytarowski wrote:
> Is this line needed?
Yes, otherwise you get unused variable warnings in no-asserts build. (Or at 
least you would get, if I had removed the `wpid != pid` check like I was 
planning to).


https://reviews.llvm.org/D33778



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to