On Sun, 1 Feb 2004, Daniel Jacobowitz wrote: > > Here you go. The bug turns out not to be related directly to > CLONE_DETACHED. Compile testcase with -DNOTHREAD to use fork (well, > clone, but without the fancy flags), without -DNOTHREAD to use > CLONE_DETACHED | CLONE_THREAD. I don't think this bug has anything to do with anything else. This program seems to show that PTRACE_KILL simply doesn't work. What ptrace_kill() does is effectively: - stage 1: ptrace_check_attach(): wait for child stopped - stage 2: PTRACE_KILL does: child->exit_code = SIGKILL; wake_up_process(child); and the thing is, it looks like the signal handling changes have totally made the child ignore the "exit_code" thing, unless I'm seriously misreading something. Roland, you know this code better than I do. Any comments? I suspect the PTRACE_KILL logic should also do a spin_lock_irqsave(child->sighand->siglock, flags); sigaddset(&child->pending->signal, SIGKILL); set_tsk_thread_flag(child, TIF_SIGPENDING); spin_unlock_irqrestore(child->sighand->siglock, flags); ptrace_detach(child); which would set the SIGKILL thing properly, but I suspect we had a good reason not to do it that way originally. Daniel? Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo _at_ vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Follow-Ups:
- Re: More waitpid issues with CLONE_DETACHED/CLONE_THREADRoland McGrath
- Re: More waitpid issues with CLONE_DETACHED/CLONE_THREADDaniel Jacobowitz
- More waitpid issues with CLONE_DETACHED/CLONE_THREADDaniel Jacobowitz
- Re: More waitpid issues with CLONE_DETACHED/CLONE_THREADLinus Torvalds
- Re: More waitpid issues with CLONE_DETACHED/CLONE_THREADDaniel Jacobowitz
- Re: More waitpid issues with CLONE_DETACHED/CLONE_THREADDaniel Jacobowitz
- Prev by Date: Re: Uptime counter
- Next by Date: Re: 2.6 input drivers FAQ (ir-kbd-gpio.ko)
- Previous by thread: Re: More waitpid issues with CLONE_DETACHED/CLONE_THREAD
- Next by thread: Re: More waitpid issues with CLONE_DETACHED/CLONE_THREAD
- Indexes:[Main][Thread]