Skip to contentSkip to conversation

which routines must be re-entrant?

QUESTION Dawson Engler 2 participants 2 messages May 31, 2001 – Jun 1, 2001

lore
Share & tools
lore
#0 lore raw

Is there an easy way to tell which routines must be re-entrant? (it doesn't have to be exhaustive, even an incomplete set is useful)

I was going to write a checker to make sure supposedly re-entrant routines actually were, but was having a hard time figuring out which ones were supposed to be...

Thanks,
Dawson

#1 lore raw
Quoted 6 lines · Dawson Engler

Is there an easy way to tell which routines must be re-entrant? (it doesn't have to be exhaustive, even an incomplete set is useful)

I was going to write a checker to make sure supposedly re-entrant routines actually were, but was having a hard time figuring out which ones were supposed to be...

Their was an post on bugtraq a few days ago about this, it had a list with all system calls which are reentrant safe under OpenBSD. The paper was about signals, and is available at

http://razor.bindview.com/publish/papers/signals.txt

OpenBSD had a manpage wich lists all the function which should be be safe to call from a signal handler. It might be a nice place to start. You should only look at those from section 2 of course.

http://www.openbsd.org/cgi-bin/man.cgi?query=sigaction

Kurt