lkml.org 
[lkml]   [2003]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch] Re: Problem with exiting threads under NPTL


    On Sun, 14 Dec 2003, Ingo Molnar wrote:
    >
    > the code is a bit ugly, but it's necessary - a parent can decide _after_
    > starting the child that it wants to detach it. (by setting SIGCHLD to
    > SIG_IGN. The testcase doesnt do this.) So the only place where we can
    > detect the detached-ness of a process is in do_notify_parent().

    Hmm.. What if "leader->exit_signal" was -1 already _before_ we call
    "do_notify_parent()"? In that case we'd never call "do_notify_parent()"
    for the leader at all, and we would also not release it outselves, the way
    you've done the test.

    Or is that case impossible to trigger? Looks a bit like that. But if it
    _is_ impossible to trigger (ie exit_signal cannot be -1 for a thread
    leader), then why does the current code test for "&& leader->exit_signal
    != -1)" at all?

    That code looks fragile as hell. I think you fixed a bug and it might be
    the absolutely proper fix, but I'd be happier about it if it was more
    obvious what the rules are and _why_ that is the only case that matters..

    Linus
    -
    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/

    \
     
     \ /
      Last update: 2009-11-18 23:46    [W:0.018 / U:0.932 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site