patch applied (packages/network): workaround for non-thread-safety of some functions in Network.BSD

Simon Marlow simonmar at microsoft.com
Thu Jan 26 10:35:34 EST 2006


Thu Jan 26 07:30:14 PST 2006  Simon Marlow <simonmar at microsoft.com>
  * workaround for non-thread-safety of some functions in Network.BSD
  Various functions in Network.BSD are non-thread-safe,
  eg. getHostByName, because the underlying gethostbyname() provided by
  the C library uses static storage.  The workaround here is to use a
  giant lock around these functions.
  
  In some cases, even the API we provide is itself unsafe, relying on
  implicit state (eg. getHostEntry), but this commit makes no attempt to
  fix that.  We should deprecate this library in favour of a complete
  replacement at some point (before 6.6 would be nice).
  
  Thanks to Einar Kartunnen for the patch.

    M ./Network/BSD.hsc -85 +119


More information about the Cvs-libraries mailing list