lkml.org 
[lkml]   [2001]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] 2.4.9 Make thread group id visible in /proc/<pid>/status


    --On Monday, August 20, 2001 19:09:16 +0000 Miquel van Smoorenburg
    <miquels@cistron-office.nl> wrote:

    > Hmm, I've always been a bit curious about this .. I don't think getpid()
    > should return tgid instead of pid. It looks broken to me. Thread groups
    > are a good idea, but they should act more like process groups do.
    > Switching pid and tgid is something that the LinuxThreads library
    > should probably do, but not the kernel. IMHO.
    >
    > If one really wants CLONE_PID to work, fix CLONE_PID.

    I wasn't on the list when getpid() was changed to return tgid. I don't
    have a strong feeling about it, though it does make pthread semantics
    simpler.

    CLONE_PID really isn't the semantic we want, though. That would make all
    tasks in the process have the same pid, and no way to address a specific
    task. We'd have to introduce something like a task id or a thread id.
    Having tgid and pid gives us the tools we need, and minimizes the
    compatibility issues.

    Dave McCracken

    ======================================================================
    Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059
    dmccr@us.ibm.com T/L 678-3059

    -
    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: 2005-03-22 12:57    [W:0.087 / U:0.560 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site