Skip to contentSkip to conversation

Should getaddrinfo_a be marked "MT-Safe env locale" (not "MT-Safe")?

DISCUSSION Josh Triplett 1 participant 1 message Mar 8, 2021 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

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