Skip to contentSkip to conversation

manpages-dev: please note thread safeness of %m in vfprintf(3)

DISCUSSION Stéphane Aulery 2 participants 4 messages Mar 7, 2015 – Mar 9, 2015 3 messages not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

Hello Ma Shimiao,

A Debian user has applied to mention that strerror_r(3) is thread safe.

I quote his message [1]:

Quoted 8 lines

Frome Martin Godisch <[email protected]>, 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.

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,

Signature · 5 lines
Stéphane Aulery
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Hello Stéphane,

Quoted 10 lines · Stéphane Aulery

Hello Ma Shimiao,

A Debian user has applied to mention that strerror_r(3) is thread safe.

I quote his message [1]:

Quoted 4 lines

Frome Martin Godisch <[email protected]>, 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 11 lines
Quoted 4 lines

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,

Signature · 7 lines
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Hello Ma Shimiao,

Quoted 10 lines · Ma Shimiao
Quoted 7 lines · Stéphane Aulery

A Debian user has applied to mention that strerror_r(3) is thread safe.

Quoted 4 lines

Frome Martin Godisch <[email protected]>, 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.

Quoted 7 lines

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.

I will send you answer to Martin Godisch, but I don't think there is something special. I will wait your patch before closing this bug.

Thanks.

Regards,

Signature · 5 lines
Stéphane Aulery
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Hi Stéphane,

Quoted 21 lines · Stéphane Aulery

Hello Ma Shimiao,

Quoted 10 lines · Ma Shimiao
Quoted 7 lines · Stéphane Aulery

A Debian user has applied to mention that strerror_r(3) is thread safe.

Quoted 4 lines

Frome Martin Godisch <[email protected]>, 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.

Quoted 7 lines

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.

Quoted 2 lines

I will send you answer to Martin Godisch, but I don't think there is something special. I will wait your patch before closing this bug.

OK. I will send my patch as soon as possible.

Best regards,

Quoted 5 lines

Thanks.

Regards,

Signature · 7 lines
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html