[lkml]   [1999]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: linuxthreads and tid testing
> Eric PAIRE <> writes:
> > I don't really understand why a kernel patch is needed to have a uniq
> > PID for a thread. I would have implemented a getpid() in the libpthread
> > (hiding the getpid() from libc), as well as a getppid().
> And how do you handle things like credentials? These data structures
> are filled by the kernel. Send such a package from a thread and the
> receiver will see the PID of the thread, and not the manager.
> There are certainly other situations like this. An only-user-level
> solution cannot work.
Don't you think that this should be the purpose of the CLONE_PID flag ?
With this flag, all system calls returning the current pid would return
the pid of the last clone() call without this flag set, except getpid()
(in order to get a standard way to get the actual kernel pid of a
CLONE_PID thread, and because this could be hidden by the libpthread).

+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ Eric PAIRE
Web : | Group SILICOMP - Research Institute
Email: | 2, avenue de Vignate
Phone: +33 (0) 476 63 48 71 | F-38610 Gieres
Fax : +33 (0) 476 51 05 32 | FRANCE

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:53    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean