Re: clone() <-> getpid() bug in 2.6?

Davide Libenzi
2004-06-05T23:26:23Z

On Sat, 5 Jun 2004, Linus Torvalds wrote:

>
>
> On Sat, 5 Jun 2004, Davide Libenzi wrote:
> >
> > It is likely used by pthread_self(), that is pretty much performance
> > sensitive. I'd agree with Ulrich here.
>
> It _can't_ be used for pthread_self(), since the pid is the _same_ across
> all threads in a pthread environment.

Yeah, I just checked. It is not for that. And like Robert was saying, it'd
have been a gettid().

- Davide