* strace.c (detach): If TCB_IGNORE_ONE_SIGSTOP is set,
di not PTRACE_DETACH - wait for SIGSTOP first.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* would be left stopped (process state T).
*/
sigstop_expected = (tcp->flags & TCB_IGNORE_ONE_SIGSTOP);
+ if (sigstop_expected)
+ goto wait_loop;
error = ptrace(PTRACE_DETACH, tcp->pid, 0, 0);
if (error == 0) {
/* On a clear day, you can see forever. */
}
if (sigstop_expected || interrupt_done) {
+ wait_loop:
for (;;) {
int sig;
if (waitpid(tcp->pid, &status, __WALL) < 0) {