lkml.org 
[lkml]   [1999]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: linuxthreads and tid testing
Date
From
> Eric PAIRE <eric.paire@ri.silicomp.com> 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
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ Eric PAIRE
Web : http://www.ri.silicomp.com/~paire | Group SILICOMP - Research Institute
Email: eric.paire@ri.silicomp.com | 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 majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.048 / U:0.128 seconds]
©2003-2014 Jasper Spaans. Advertise on this site