From: ts Date: 2002-06-12T00:25:59+09:00 Subject: Re: hostent extension problem - returning the ip address >>>>> "S" == Sunblade writes: S> Data_Wrap_Struct(cHost,0,host_free,hp); [...] S> hp = gethostbyname(h); S> pptr = hp->h_addr_list; S> Data_Wrap_Struct(cHost,0,host_free,pptr); /* problem here? */ Why do you use Data_Wrap_Struct() ? On Solaris 8, for gethostbyname(3) The functions gethostbyname(), gethostbyaddr(), and gethos- tent() use static storage that is reused in each call, mak- ^^^^^^^^^^^^^^ ing these functions unsafe for use in multi-threaded appli- cations. Guy Decoux