2011/2/10 Michal Nazarewicz <mina86@xxxxxxxxxx>:
> On Thu, 10 Feb 2011 12:37:25 +0100, ratheesh k <ratheesh.ksz@xxxxxxxxx>
> wrote:
>>
>> i created two threads with pthread library. But both threads returns
>> same pid with getpid() function. ???
>
> PID is a Process ID. All threads in given process have the same PID.
>
pthread uses clone system call. doen't it ? if so, please see - man clone
CLONE_PID (obsolete)
If CLONE_PID is set, the child process is created with the same
process ID as the calling process. This is good for hacking the
system, but otherwise of not much use. Since 2.3.21 this flag
can be specified only by the system boot process (PID 0). It
disappeared in Linux 2.5.16.
> --
> Best regards, _ _
> .o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o
> ..o | Computer Science, Michal "mina86" Nazarewicz (o o)
> ooo +-<email/jid: mnazarewicz@xxxxxxxxxx>--------ooO--(_)--Ooo--
>
--
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 http://vger.kernel.org/majordomo-info.html
[Linux Assembler]
[Git]
[Kernel List]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[Yosemite Campsites]
[Yosemite News]
[GCC Help]