Bug #154

gethostbyname is deprecated and not reentrant

Added by Ruben Lopez almost 8 years ago. Updated over 7 years ago.

Status:FixedStart date:10/07/2010
Priority:NormalDue date:
Assignee:Jorge Daza Garcia-Blanes% Done:

100%

Category:all
Target version:0.64.5

Description

The connect_to_master function of communications.c crashes threaded applications because it uses gethostbyname, which is not reentrant. Moreover, current POSIX specifications marked this function as deprecated in favour of getaddrinfo which is reentrant and handles IPv4 or IPv6 in a more transparent way.

We are having problems with our own threaded apps that we can workaround with mutexes, but this hurts performance :(

History

#1 Updated by Andreas Schröder almost 8 years ago

  • Target version set to 0.64.5

#2 Updated by Andreas Schröder over 7 years ago

Can you please provide a patch for this ticket?

#3 Updated by Andreas Schröder over 7 years ago

  • Status changed from New to In progress
  • Priority changed from High to Normal

#4 Updated by Jorge Daza Garcia-Blanes over 7 years ago

  • Assignee set to Jorge Daza Garcia-Blanes

#5 Updated by Jorge Daza Garcia-Blanes over 7 years ago

  • Status changed from In progress to Solved
  • % Done changed from 0 to 100

Done. Rubén, let me know if it works.

#6 Updated by Andreas Schröder over 7 years ago

Compiles and seems to be working for me.

#7 Updated by Ruben Lopez over 7 years ago

Sorry, I forgot to monitor this item. It seems ok for me too. Thanks!

#8 Updated by Andreas Schröder over 7 years ago

  • Status changed from Solved to Fixed

Also available in: Atom PDF