The libpthread getpid() return value will be the PID of the thread manager,
and getppid() the PID of the parent of the first thread created. In order
to get the actual pid of the thread, then you will have to use __getpid().
The same mechanism would also be implemented for getppid().
I don't think that this may break anything (except for older programs using
getpid() with a wrong POSIX semantic), since __getpid() should not be used
in portable pthreaded programs; and the big advantage is to run on any
actual kernel with a getpid()/getppid() POSIX-semantics.
-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/