site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com User-agent: Thunderbird 1.5.0.2 (Windows/20060308) On May 2, 2006, at 21:18 , Tron Thomas wrote: _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... I know that gethostbyname is not re-entrant. That is why I was asking if there was another re-entrant alternative that could be used. What is the reason there is no re-entrant equivalent for gethostbyname? Dale Walsh wrote: I work on a cross platform project that is multithreaded. The code base wants to call gethostbyname_r as a thread safe way of connecting to a host sever. However, this function is not supported on Mac OS X. What is the equivalent thread safe way to accomplish the same functionality? The gethostbyname_r function can be replaced with gethostbyname, which is similar except that it is non-reentrant. Replacing a reentrant function with a non-reentrant function is not a favored alternative, as it can cause unpredictable and hard-to-trace bugs if the calling function doesn't terminate the call appropriately and take into consideration that the call itself might time out which would result in unpredictable behavior if this returned data is not tested/validated. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com <mailto:Darwin-dev@lists.apple.com>) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/dale%40daleenterprise.com This email sent to dale@daleenterprise.com <mailto:dale@daleenterprise.com> This email sent to site_archiver@lists.apple.com