aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_posts/2022-11-07-ptrace-waitpid.md
diff options
context:
space:
mode:
Diffstat (limited to '_posts/2022-11-07-ptrace-waitpid.md')
-rw-r--r--_posts/2022-11-07-ptrace-waitpid.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/_posts/2022-11-07-ptrace-waitpid.md b/_posts/2022-11-07-ptrace-waitpid.md
index 3c331c7..b5f34fa 100644
--- a/_posts/2022-11-07-ptrace-waitpid.md
+++ b/_posts/2022-11-07-ptrace-waitpid.md
@@ -36,6 +36,8 @@ status changes from other thread's children.
So if you have two tracer threads A and B, and each of them is attached to a
tracee, then thread A might consume thread B's tracee status change by calling
`waitpid(-1)`.
+Therefore, thread A would have thread B's tracee status.
+A typical application could be completely unprepared for this scenario.
To avoid that, use the `__WNOTHREAD` flag.
That way, thread A will only consume status changes from its own children only.