From: <st...@ni...> - 2004-11-10 08:36:38
|
> This fact (glibc caches getpid() results) was even known because already > posted, and I guessed that this could happen only with TLS support. That glibc caches getpid() has been a known issue before when people wanted to benchmark uml syscall speeds inside vs outside of UML using a simple libc-function. A clone() call can't easily invalidate caches around in libs that are stored in statics. But it should be mentioned on getpid()'s man/info page that the value might be cached. Perhaps sende the glibc dudes an email with the problem, and either get them to remove the cache or document it. Either way it will be a problem, since people might use a version of glibc then that caches getpid.. only work-around is to use syscall() directly, or avoid using getpid() before clone(). Stian |