Use reentrant functions for safer signal handling
In the early days of programming, non-reentrancy was not a threat to programmers; functions did not have concurrent access and there were no interrupts. In many older implementations of the C language, functions were expected to work in an environment of single-threaded processes. Now, however, concurrent programming is common practice, and you need to be aware of the pitfalls.