[AGENT++] Use of non thread safe getservbyname in AgentXSlave::bind_tcp() & AgentXMaster::bind_tcp() (agentx.cpp)
michael.carr at bt.com
michael.carr at bt.com
Tue Jun 2 10:53:46 CEST 2009
Frank, Jochen, anyone? Surely this must non thread safe problem should
be addressed?
> _____________________________________________
> From: Carr,M,Michael,JGFTX C
> Sent: 15 May 2009 12:14
> To: Agentpp mailing list
> Subject: Use of non thread safe getservbyname in
> AgentXSlave::bind_tcp() & AgentXMaster::bind_tcp() (agentx.cpp)
>
> Hi all,
>
> As per the subject title, surely this should not be used since it's
> not thread safe? An alternative, which may not be available for all
> targets/compilers, is getservbyname_r. Looking at other similar
> functions like gethostbyname I see that config_snmp_pp.h has a series
> of #defines to cater for the situation where the thread safe version
> is available, should this also be applied in this case?
>
> Also, after looking on the web some say that the getaddrinfo function
> should be used instead?
>
> Thanks,
> Mike
>
More information about the AGENTPP
mailing list