Mats Wichmann <mats@laplaza.org> writes: > >I think that part is already settled: getaddrinfo, on Linux, is > >thread-safe. > > The latest Posix/Single UNIX spec in fact require getaddrinfo > (and getnameinfo) to be thread-safe. Yes, but this doesn't stop *BSD from providing a getaddrinfo implementation that is not thread-safe - they merely document that limitation on the man page. > Gives me a headache, too, especially once it vectors off into > the glibc nss code. These routines (__gethostbyname2_r is the > likely suspect, __gethostbyaddr_r and __getservbyname_r might > also get called) do have paths that could twiddle a glibc internal > lock so it's not impossible there's an issue here, although at > something less than a term-paper-depth look it doesn't SEEM like > it should ever be able to block for very long. I'd recommend to use strace for further analysis, perhaps using it's -r option. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4