This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
is vsnprintf() async signal safe in glibc?
- From: Andrew Aksyonoff <andrew dot aksyonoff at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Wed, 17 Nov 2010 21:00:13 +0300
- Subject: is vsnprintf() async signal safe in glibc?
Hello,
I know that vsnprintf() implementation isn't in de jure POSIX list of
async safe functions, but is the implementation in glibc de facto
safe?
Quick look at the code reveals that, at the very least, it does not
seem to be do any actual locking when using _IO_strnfile.
But given the overall complexity, I am not sure I'm not missing some
other unsafe calls, such as temporary memory allocations, for
instance.
Interestingly it's possible to google up mentions of vsnprintf() being
safe on OpenBSD, SunOS, etc but nothing about generic Linux and glibc.
--
Andrew Aksyonoff
Sphinx Technologies Inc, http://sphinxsearch.com