Consensus on MT-, AS- and AC-Safety docs.
Rich Felker
dalias@aerifal.cx
Thu Nov 21 19:53:00 GMT 2013
On Tue, Nov 19, 2013 at 10:39:22PM +0000, Joseph S. Myers wrote:
> * libm functions generally may set the thread-local errno. If a signal
> handler calls such a function without saving and restoring errno, whatever
> code in the thread was interrupted may see an unexpected errno change, and
> libc code may not be robust against errno changing asynchronously during a
> libc function. (I don't know if there are functions beyond the libm and
> strtod/atof families that are AS-Safe but with an errno caveat.)
All AS-safe functions have the potential to modify errno (since all
functions in the standard library do); many are even required to
modify it. When using any library function in a signal handler, it's
the programmer's responsibility to save errno and restore its value
before returning.
Rich
More information about the Libc-alpha
mailing list