tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] pthread_once and fork



On Sat, Apr 12, 2025 at 02:36:57AM +0000, Taylor R Campbell wrote:
> Proposal:
> 
>    Make pthread_once mutually exclusive with fork -- mainly at the
>    cost of one leaf function call and two predicted-not-taken
>    conditional branches in fork, plus a little more private coupling
>    between libc and libpthread.
> 
> Thoughts?

I like it.

Minor nit: should the fork(2) man page be updated to document EDEADLK?
I find that error code slightly suprising for a fork operation but it
is spot on and the program did something very stupid to get it.

Martin


Home | Main Index | Thread Index | Old Index