| Summary: | ptrace: __WNOTHREAD does not work | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Jan Kratochvil <jan.kratochvil> | ||||
| Component: | kernel | Assignee: | Oleg Nesterov <onestero> | ||||
| Status: | CLOSED DEFERRED | QA Contact: | Red Hat Kernel QE team <kernel-qe> | ||||
| Severity: | low | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 5.5.z | CC: | anton, bauerman, kernel-mgr | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-02-02 14:12:18 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Jan Kratochvil
2011-05-17 21:55:29 UTC
(In reply to comment #0) > > Description of problem: > With ptraced threaded child with exited thread group leader task one should be > able to waitpid somehow on it. waitpid (PID, &status, 0) will wait till all > the threads will exit. Yes, known oddity, I already mentioned this several times on lkml. In particular, see the recent thread: http://marc.info/?l=linux-kernel&m=130555999731900 There is additional complication with the group-leader. If it is traced and exits, do_wait(WEXITED) doesn't work (until all threads exit) for the tracer. Should be changed, I think. So yes, I believe this should be changed. But this is not trivial, and it is not clear what exactly we should do. I'll try to do this after the pending ptrace changes. > I believe waitpid (PID, &status, __WNOTHREAD) should Please note that this has nothing to do with __WNOTHREAD. This flags means: ignore the tasks/threads cloned/traced by our sub-threads. (In reply to comment #1) > I'll try to do this after the pending ptrace changes. OK, thanks. Do whatever you like with this tracking Bug. > > I believe waitpid (PID, &status, __WNOTHREAD) should > > Please note that this has nothing to do with __WNOTHREAD. > This flags means: ignore the tasks/threads cloned/traced > by our sub-threads. OK, thanks for the info, I will forget about __WNOTHREAD. |