Messages in this thread Patch in this message |  | | Date | Sun, 15 Sep 2002 14:37:40 +0200 (CEST) | From | Ingo Molnar <> | Subject | [patch] wait4-fix-2.5.34-B2, BK-curr |
| |
the attached patch (ontop of the previous exit.c patch) fixes a number of bugs that broke ptrace:
- wait4 must not inhibit TASK_STOPPED processes even for thread group leaders.
- do_notify_parent() should not delay the notification of parents if the thread in question is ptraced.
strace now works as expected for CLONE_THREAD applications as well.
Ingo
--- linux/kernel/signal.c.orig Sun Sep 15 14:24:21 2002 +++ linux/kernel/signal.c Sun Sep 15 14:36:43 2002 @@ -1105,7 +1105,7 @@ struct siginfo info; int why, status; - if (delay_group_leader(tsk)) + if (!tsk->ptrace && delay_group_leader(tsk)) return; if (sig == -1) BUG(); --- linux/kernel/exit.c.orig Sun Sep 15 14:10:07 2002 +++ linux/kernel/exit.c Sun Sep 15 14:10:38 2002 @@ -770,11 +770,6 @@ if (!ret) continue; flag = 1; - /* - * Eligible but we cannot release it yet: - */ - if (ret == 2) - continue; switch (p->state) { case TASK_STOPPED: @@ -798,6 +793,11 @@ } goto end_wait4; case TASK_ZOMBIE: + /* + * Eligible but we cannot release it yet: + */ + if (ret == 2) + continue; read_unlock(&tasklist_lock); retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0; if (!retval && stat_addr) { - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |