Re: same pid ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Fri, Feb 11, 2011 at 03:18, ratheesh k <ratheesh.ksz@xxxxxxxxx> wrote:
>>On Fri, Feb 11, 2011 at 4:56 AM, Jonathan Isom <jeisom@xxxxxxxxx> wrote:
>> Newer distros use Native POSIX Thread Library (NPTL).  They return the same pid.
> if linux treats every thing as task (both thread and process ) and
> CLONE_PID flag is obsolete, i expected unique pid.

POSIX.1 requires threads to share a couple of attributes (mainly
process attributes) like the process ID, open FDs and many others.
What you are referring to ("everything as task") is the fact that each
thread is associated with a single scheduling entity within the kernel
implementing a 1:1 mapping.  Yet, threads created within the same
process share a single PID.

You are advised to consult pthreads(7) to make yourself familiar with the topic.

To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux