RFC: mutexes acquired before fork() remain to be acquired by the parent process after fork()

Zack Weinberg zackw@panix.com
Wed Dec 28 17:11:00 GMT 2016


>
> Maybe we can support lock reinitialization in the child?  I think this
> should cover the majority of pthread_atfork use cases.  It would work nicely
> if we start the child process with an empty robust mutex list, too.

I have a dim memory of a mmap flag in one of the BSDs that causes
pages to get zeroed in the child on fork(). I can't find it now, but
if we could get Linux to add that, it would help with this as well as
several other problems, I think.

zw



More information about the Libc-alpha mailing list