Forgot to answer this in the first reply, sorry. > Note the "XXX" comment in ptrace_abort_attach(). I am not sure a simple > UTRACE_DETACH is always correct. We already did utrace_set_events(), we > must not, say, lose a signal if it comes in between.
I don't follow what scenario you are concerned with here. UTRACE_DETACH will never cause you to "lose" anything. Either you'll get some callback you've enabled before the detach completes (before your utrace_control call, or after or simultaneous with a -EINPROGRESS return from it), or you won't. If you don't, the signal does its normal thing. If you do, you do. The callback just needs to: return utrace_signal_action(action) | UTRACE_DETACH; or return utrace_signal_action(action) | UTRACE_RESUME; to have no effect on the signal. Thanks, Roland