[PATCH] fix non-leader exec under ptrace

This reverts most of commit 30e0fca6c1.
It broke the case of non-leader MT exec when ptraced.
I think the bug it was intended to fix was already addressed by commit
788e05a67c.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Roland McGrath
2006-04-12 16:30:20 -07:00
committed by Greg Kroah-Hartman
parent 49fa79e568
commit 18b1e8193e
2 changed files with 4 additions and 7 deletions
+2 -5
View File
@@ -57,10 +57,6 @@ void ptrace_untrace(task_t *child)
signal_wake_up(child, 1);
}
}
if (child->signal->flags & SIGNAL_GROUP_EXIT) {
sigaddset(&child->pending.signal, SIGKILL);
signal_wake_up(child, 1);
}
spin_unlock(&child->sighand->siglock);
}
@@ -82,7 +78,8 @@ void __ptrace_unlink(task_t *child)
SET_LINKS(child);
}
ptrace_untrace(child);
if (child->state == TASK_TRACED)
ptrace_untrace(child);
}
/*
+2 -2
View File
@@ -1942,9 +1942,9 @@ relock:
/* Let the debugger run. */
ptrace_stop(signr, signr, info);
/* We're back. Did the debugger cancel the sig or group_exit? */
/* We're back. Did the debugger cancel the sig? */
signr = current->exit_code;
if (signr == 0 || current->signal->flags & SIGNAL_GROUP_EXIT)
if (signr == 0)
continue;
current->exit_code = 0;