4 ms·
> I'm not convinced it's "serious" --- thread-local-storage easily solves that. What about other cases of exceptional control flow? What happens if a signal a
by Athas 4y ago
> I'm not convinced it's "serious" --- thread-local-storage easily solves that.
What about other cases of exceptional control flow? What happens if a signal arrives while that static area is being used, and the signal handler also needs to use the static area?
- userbinator 4y agoThe set of functions that can be called from a signal handler is very small (most of them corresponding to system calls or otherwise non-stateful functions like strchr()); gethostbybame() is not one of them, and neither are malloc() nor free().