Date: Sun, 2 Mar 2025 22:46:24 +0000
From: "Taylor R Campbell" <[email protected]>
Message-ID: <[email protected]>
| Log Message:
| libc: New __libc_atfork.
|
| This uses caller-provided storage for the callback queues.
|
| Use it in arc4random(3) in order to avoid possible failure modes.
This is the wrong solution, it exposes the _atfork data struct outside
pthread_atfork.c which will make it essentially impossible to ever alter
the internals of that interface.
arc4random() should simply cope with pthread_atfork() failing, which its
interface spec says it is entitled to do, and which all other callers need
to deal with.
I do agree with PR lib/59117 that abort() is not a suitable "deal with"
though, but there are other ways (slower perhaps) of generating pseudo-random
bit strings (of suitable quality) that do not require the services of
pthread_atfork(). We should simply do that.
kre