Caching of PID/TID after fork
Florian Weimer
fw@deneb.enyo.de
Fri Oct 7 19:38:00 GMT 2016
* Robert Święcki:
> Thefore I'd like to ask for one of the following solutions:
>
> 1. Don't cache PID/TID
>
> 2. Provide some kind of symbol, which would force for TID/PID to be
> reloaded in glibc.
I think we need a different design.
For example, when you clone a process, you really want that all
cryptographic random number generators are reinitialized. Making this
depend on getpid does not really work, so we need a more general
solution.
The other question I have is whether we talk about clone-as-fork
exclusively. Introducing a new thread into the process on which
non-free-standing code can run using clone is a different matter
altogether.
More information about the Libc-alpha
mailing list