mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-23 01:00:54 +00:00
A caught signal (the handlers are inherited by the child) delivered between PTRACE_TRACEME and exec first produces a signal-delivery stop; without handling it, the setup would run on the still pre-exec child and capture the monitor's own image as the target's. Re-inject the caught signal and wait again until the exec stop is reached. Job-control stops are the exception - re-injecting SIGSTOP/SIGTSTP re-stops the child, and PTRACE_CONT rejects a stop carrying the 0x80 job-control bit - so resume those without a signal instead.