-
Roland McGrath authored
Upon reevaluation we think it is indeed safe to permit the race between a ptrace call and the traced thread waking up, as long as it will never get back to user mode. This patch makes SIGKILL wake up threads in TASK_TRACED. That alone resolves most of the deadlock issues that became possible with the introduction of TASK_TRACED, getting us back to the killing behavior of 2.6.8 and before. This patch also further cleans up ptrace detaching, so that threads are left in TASK_STOPPED only if a job control stop is actually in effect, and otherwise resume. This removes the past nuisances requiring a SIGCONT to resume a thread even when it had a pending SIGKILL. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
4c2e8e62