aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_posts/2022-11-07-ptrace-waitpid.md
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-01-31 14:38:03 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2023-01-31 14:38:03 +0100
commitdf82a2db4b823162c00ce2d788a1b213bb9191f6 (patch)
tree2a4f1bcac773d6da83a90f2fbb3edc4f82a51e78 /_posts/2022-11-07-ptrace-waitpid.md
parentworkflows/jekyll: upgrade actions (diff)
downloadblog-df82a2db4b823162c00ce2d788a1b213bb9191f6.tar.gz
blog-df82a2db4b823162c00ce2d788a1b213bb9191f6.zip
ptrace-waitpid: update
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.