[freetds] Strange TODO

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Fri Jul 25 11:31:12 EDT 2008


> 
> > 
> > Thus spake Frediano: 
> > 
> > > How to fix all these problems?? 
> > > - we have no safe source for servent_data (private libc 
> > header is not
> > > installed).  - we can implement a thread-safe 
> getservbyname locking
> > > _servent_mutex directly and call getservbyname_r (not that 
> > clean) and
> > > endservent_r (avoid leaks). - use getaddrinfo, is it 
> > thread-safe under
> > > NetBSD ??
> > 
> > It turns out we're going about this all wrong.  Instead of 
> > getservbyname_r
> > et al., we should be using getnameinfo/getaddrinfo.  Those should be
> > threadsafe on any platform, and are standard.  
> > 
> > Do you think it's feasible to abandon getservbyname_r?  Do we 
> > support any
> > platform on which getservbyname_r is implemented but 
> > getaddrinfo is not? 
> > 
> > --jkl
> > 
> 
> Yes, we can do. The problem is that some getaddrinfo 
> implementations (FreeBSD or NetBSD if
> I remember) are NOT threadsafe !! But well... perhaps 
> nowadays these platforms are quite
> old...
> 

Referring to
http://www.freebsd.org/cgi/man.cgi?query=getaddrinfo&apropos=0&sektion=3&manpath=NetBSD+4.
0&format=html
from NetBSD 4.0 and FreeBSD 6.0 these functions are thread-safe (not fully before :( )

freddy77
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3129 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20080725/7f3bf800/attachment.bin 


More information about the FreeTDS mailing list