Caching of PID/TID after fork

Robert Święcki robert@swiecki.net
Fri Oct 7 14:44:00 GMT 2016


2016-10-07 2:43 GMT+02:00 Zack Weinberg <zackw@panix.com>:

>> I've thought for quite some time that there should be a second
>> clone-wrapper in glibc that doesn't ask for a new stack.  It might be
>> better to call it something with "clone" in the name, but I don't care
>> terribly much.
>
> Meant to say: in addition to the PID/TID caching issues, this would be
> able to run pthread_atfork() handlers.

Maybe..

 __clone3(unsigned long clone_flags, void* newsp, pid_t*
parent_tidptr, pid_t* child_tidptr, void* tls);

?

__clone2 seems to be used with ia64 already.

-- 
Robert Święcki



More information about the Libc-alpha mailing list