PID caching problem

Carlos O'Donell carlos@systemhalted.org
Wed Jul 8 20:39:00 GMT 2009


On Wed, Jul 8, 2009 at 2:10 AM, Michele Alberti<mic.alberti@gmail.com> wrote:
>> what if code caches the result themselves in global data ?
>
> you're right, I was aware of it. It's not a solution (and goes on the
> way "just work") but I can say: it's up to the programmer/user of the
> project write programs without caching internally the pid and base the
> code on it.

You can say whatever you want, but it's not true.

Programmers follow a standard, and the standard in this case is POSIX,
and POSIX expects the PID to be constant otherwise you can't reliably
wait on your children or do anything else that requires a PID.

Cheers,
Carlos.



More information about the Libc-help mailing list