[PATCH] uml: use sys_getpid bypassing glibc (fixes UML on Gentoo)
From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>, Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Ulrich Drepper <drepper@redhat.com> Using NPTL, getpid() sometimes delivers the wrong pid, since it uses the one buffered in TLS from previous calls. This buffered pid isn't discarded, when a child is created by a clone(). So, as a workaround, UML should use a direct kernel call to bypass the lib. Also, I (Paolo) went replacing all remaining calls of getpid() with os_getpid(), to make sure they use the syscall and not the normal glibc definition. Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment