Re: manpages-dev: please note thread safeness of %m in vfprintf(3)
From: Ma Shimiao <hidden>
Date: 2015-03-09 06:20:07
Hello Stéphane, On 03/07/2015 06:38 PM, Stéphane Aulery wrote:
Hello Ma Shimiao, A Debian user has applied to mention that strerror_r(3) is thread safe. I quote his message [1]:quoted
Frome Martin Godisch [off-list ref], Wed, 6 Apr 2011 09:30:30 +0200 Please add a note to vfprintf(3) telling users that the %m conversion specifier is thread safe.
I'm not sure why he need a note to indicate that the %m conversion specifier is thread safe. From our research and glibc's document, vfprintf(3) is thread safe except when users pass float formatting, custom formatting or single quota may cause locale dependency problem. And I'm going to add thread safety information of vfprintf() into printf.3. If there is something special about %m, we'd like to know. And I'm willing to add it. Best regards,
quoted
Rationale: errno(3) is thread local, strerror_r(3) is thread safe, and vfprintf(3) uses errno and strerror_r (in eglibc-2.11.2/stdio-common/vfprintf.c:974).This is your area, it may interest you. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=621057 Regards,
-- Ma Shimiao Development Dept.I Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html