which routines must be re-entrant?
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
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