The right thing is not to modify a global state once you have started all the threads. If you need to do that, use your own data structures. The case of getaddrinfo - would need a copy of the entire env. in a thread safe manner, then return the result. That would pretty much apply to anything that uses env
The person who fixed this would be incredibly sexy in my book. Though, that probably tells you more about my own sexiness than it invalidates your comment.
The sexy part is more like having an extremely brushed/retouched image in a magazine - it's not real.
It is fixed in Solaris/Illumos. glibc just needs to copy the approach.