Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Call waitpid() after ptrace(PTRACE_ATTACH)
man ptrace says: PTRACE_ATTACH Attach to the process specified in pid, making it a tracee of the calling process. The tracee is sent a SIGSTOP, but will not necessarily have stopped by the completion of this call; use waitpid(2) to wait for the tracee to stop. This means there is a race condition: for a short time after ptrace(PTRACE_ATTACH) we cannot access memory of traced process.
- Loading branch information