[systemd-devel] Significant performance loss caused by commit a65f06b: journal: return -ECHILD after a fork

Florian Weimer fw at deneb.enyo.de
Tue Jul 11 19:22:53 UTC 2017


* Michael Chapman:

> It's a pity glibc doesn't provide an equivalent for pthread_atfork() 
> outside of the pthread library. Having a notification that a fork has just 
> occurred would allow us to do the PID caching ourselves.

In fact, it does, as a public symbol: __register_atfork.

It's just not really documented, so it lives a bit a vacuum, like the
old __secure_getenv call.  To fix this, we need to make the dynamic
linker disregard sonames when resolving non-interposed versioned
symbols, and then move the definition from libpthread to libc.


More information about the systemd-devel mailing list