[issue30482] socket.getservbyname(), socket.getservbyport(), socket.getprotobyname() are not threadsafe

2017-05-26 Thread Doug Freed
Doug Freed added the comment: It already checks for gethostbyname_r, but the comments in socketmodule.c mention that configure seems to get it wrong. Those comments are probably old, though, so perhaps that can be revisited as well. -- ___ Python

[issue30482] socket.getservbyname(), socket.getservbyport(), socket.getprotobyname() are not threadsafe

2017-05-26 Thread Doug Freed
New submission from Doug Freed: On at least Linux (and probably most other UNIXes, except OS X), the C functions getservbyname(), getservbyport(), and getprotobyname() are not threadsafe. CPython's wrappers around these functions in the socket module do nothing to cover up this fact. S