On 10/07, Jan Kratochvil wrote: > > OK, this is really a border case I did not mean. > > In such case the SIGHUP handler still is not fully execting and as the > non-realtime signals do not nest (count) it is OK it gets activated only once. > > > I did mean some more normal case of: > > ptrace (PTRACE_SIGNALSTEP, 0) = 0 > waitpid() = SIGTRAP > ptrace (PTRACE_SIGNALSTEP, 0) = 0 > waitpid() = SIGTRAP > PTRACE (PTRACE_DETACH, SIGSTOP) = 0 > > which I assume it will work.
Yes, this should work. In this case the tracee really has the pending SIGTRAP which will be dequeued and reported. ptrace(WHATEVER, SIGNR) will change si_signo (or cancel the signal if SIGNR = 0), PTRACE_SETSIGINFO works too. Oleg.