public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* Should getaddrinfo_a be marked "MT-Safe env locale" (not "MT-Safe")?
@ 2021-03-08 18:44 Josh Triplett
  0 siblings, 0 replies; only message in thread
From: Josh Triplett @ 2021-03-08 18:44 UTC (permalink / raw)
  To: linux-man; +Cc: Alejandro Colomar, Michael Kerrisk

getaddrinfo_a uses a thread to call getaddrinfo asynchronously. However,
as far as I can tell this means it still has all the same caveats as
getaddrinfo. Notably, it will result in a getenv call, making it unsafe
if another thread concurrently touches the environment.

Given this, I *think* it would make sense for getaddrinfo_a to be marked
"MT-Safe env locale" just like getaddrinfo. This would make sure people
know that getaddrinfo_a does not avoid the thread-safety issues of
getaddrinfo.

- Josh Triplett

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-08 18:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-08 18:44 Should getaddrinfo_a be marked "MT-Safe env locale" (not "MT-Safe")? Josh Triplett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox