Re: thread safety and host lookups

2003-10-10 Thread Louis LeBlanc
On 10/09/03 06:05 PM, Kris Kennaway sat at the `puter and typed:
 On Thu, Oct 09, 2003 at 07:31:05PM -0400, Louis LeBlanc wrote:
  Hey folks.  I'm working on a port from Solaris to FreeBSD.  For the
  most part, things are pretty straightforward, but I can't seem to find
  the details on thread safety for some system calls.
  
  gethostbyname_r() is the thread safe call that replaces
  gethostbyname() on Solaris.
  
  Is there a similar alternative call in FreeBSD, or was the default
  system call modified to ensure thread safety?
 
 Unfortunately FreeBSD does not support gethostbyname_r() at this time.
 However, it looks like bind9 has an implementation.

Hmm.  I knew I shoulda brought my Stevens book home.  I noticed in the
manpage that gethostbyname() requires the standard c lib (-lc), but
the process builds and links fine with the re-entrant c lib (-lc_r).

I'm pretty sure that doesn't fix the problem.  I looked at the
re-entrant details of gethostbyname_r() some time ago, but can't
remember the specifics since I haven't dealt with it for some time.

I'll look at the bind9 stuff.

Thanks.

L
-- 
Louis LeBlanc   [EMAIL PROTECTED]
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
http://www.keyslapper.org ԿԬ

Thyme's Law:
  Everything goes wrong at once.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


thread safety and host lookups

2003-10-09 Thread Louis LeBlanc
Hey folks.  I'm working on a port from Solaris to FreeBSD.  For the
most part, things are pretty straightforward, but I can't seem to find
the details on thread safety for some system calls.

gethostbyname_r() is the thread safe call that replaces
gethostbyname() on Solaris.

Is there a similar alternative call in FreeBSD, or was the default
system call modified to ensure thread safety?

TIA
Lou
-- 
Louis LeBlanc   [EMAIL PROTECTED]
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
http://www.keyslapper.org ԿԬ

Kramer's Law:
  You can never tell which way the train went by looking at the tracks.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: thread safety and host lookups

2003-10-09 Thread Kris Kennaway
On Thu, Oct 09, 2003 at 07:31:05PM -0400, Louis LeBlanc wrote:
 Hey folks.  I'm working on a port from Solaris to FreeBSD.  For the
 most part, things are pretty straightforward, but I can't seem to find
 the details on thread safety for some system calls.
 
 gethostbyname_r() is the thread safe call that replaces
 gethostbyname() on Solaris.
 
 Is there a similar alternative call in FreeBSD, or was the default
 system call modified to ensure thread safety?

Unfortunately FreeBSD does not support gethostbyname_r() at this time.
However, it looks like bind9 has an implementation.

Kris


pgp0.pgp
Description: PGP signature