---

developerWorks: 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. This article describes some
potential problems due to non-reentrancy of the function in
parallel and concurrent programming. Signal generation and handling
in particular add extra complexity. Due to the asynchronous nature
of signals, it is difficult to point out the bug caused when a
signal-handling function triggers a non-reentrant function…”


Complete Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis