Subject: Re: CVS commit: src/sys
To: Thor Lancelot Simon <tls@rek.tjls.com>
From: David Laight <david@l8s.co.uk>
List: tech-security
Date: 06/25/2007 07:56:45
On Sun, Jun 24, 2007 at 10:19:44PM -0400, Thor Lancelot Simon wrote:
> 
> Perhaps this would be a reasonably elegant way to handle getppid() without
> any kind of asynchronous notification to the process, though.  But for
> getpid() a local variable will do -- unless you see some reason why it
> won't?

Libc would need to know to change it in the child of fork().
(and back again in the parent after vfork()).

Apart from winning the benchmark game - because someone decides that
getpid() ought to be the cheapest benchmark - I'm surprised there
are any real benefits that wouldn't be greater if the app itself
were optimised instead.

	David

-- 
David Laight: david@l8s.co.uk