• Julius Plenz's avatar
    Supply “lazy initializers” in every intercepted function · 1a36b32e
    Julius Plenz authored
    The friendly folks at #musl say:
    
    20:52 < dalias> i think it's good to have both that and the ctor
    20:52 < Feh> This should increase robustness if it is in every function.
    20:52 < dalias> because...
    20:52 < dalias> several of these functions are required to be async-signal-safe
    20:53 < dalias> so if the first call happened to be from a signal handler,
       you'd be in trouble if you didn't already have the ctor
    20:54 < dalias> in theory another ctor in another lib or the app could run
       before yours and install and run a signal handler :-p but that's pretty
       unlikely and pathological
    20:54 < dalias> so i think having both the ctor and the lazy-init keeps you
       safe in situations that will arise in the real world
    1a36b32e
Name
Last commit
Last update
man Loading commit data...
t Loading commit data...
COPYING Loading commit data...
Makefile Loading commit data...
README Loading commit data...
README.md Loading commit data...
cachedel.c Loading commit data...
cachestats.c Loading commit data...
fcntl_helpers.c Loading commit data...
fcntl_helpers.h Loading commit data...
nocache Loading commit data...
nocache.c Loading commit data...
nocache.global Loading commit data...