This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: cached getpid
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Torsten Foertsch <torsten dot foertsch at gmx dot net>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Sun, 10 Apr 2005 14:52:23 +0200
- Subject: Re: cached getpid
- References: <200504101447.21651.torsten.foertsch@gmx.net>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sun, Apr 10, 2005 at 02:47:21PM +0200, Torsten Foertsch wrote:
> Hi,
>
> I have just discovered that my glibc (2.3.3) is caching the getpid() result.
> What can I do to invalidate the cache after a "syscall( SYS_clone )" or
> "syscall( SYS_fork )"?
Use clone () or fork () libc functions instead?
Or alternatively use syscall (SYS_getpid) instead of getpid().
Jakub