Reentrant gethostbyname_r, sigpipe handling, readwrite error handling
Reverted to safe zone
Hopefully safe
Hope it works