Comment 4 for bug 103133

Revision history for this message
Micah Cowan (micahcowan) wrote :

wait() doesn't have meaning for separate threads; only for processes. Additionally, it is not possible to run strace, except as a separate (child) process. And, while "proc" does /represent/ an interface to the child, it's still the parent that is doing the wait()ing, upon its child (which is the strace process). It seems to me that the man page is highly relevant; but I'm happy to wait for a second opinion.

As to reliably tracing oneself, you might try a method that would involve killing the strace process (SIGTERM, probably), instead of waiting for it to complete (which will cause strace to SIGSTOP the parent).