Hehe, consider something like wanting to log an error message from a signal handler catching SIGFAULT...
Except the standard logger route my isn’t signal safe, nor much of the basic library routines one would want to use!
The only sane solution is to block/mask all signals, perhaps polling for them if really needed. Anything else is on the path to insanity.