Advanced #Programming in the #UNIX Environment
Week 7, Reentrant and Interrupted Functions
We learn that only functions guaranteed to be async-signal-safe can safely be used in signal handlers (see sigaction(2)), as well as what happens when we are interrupted while blocking on certain I/O. (Note: some Unix versions provide reentrant "_r" versions of otherwise non-reentrant functions (see e.g., ctime_r(3)). Both are distinct from thread-safe functions.)