Re: [PATCH] pthread_once and fork
Martin Husemann <[email protected]> Sat, 12 Apr 2025 08:51:50 +0200
| Newsgroups | gmane.os.netbsd.devel.userlevel |
|---|---|
| Message-ID | <[email protected]> |
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