diff options
author | Stig Bakken <ssb@php.net> | 1999-09-07 18:46:25 +0000 |
---|---|---|
committer | Stig Bakken <ssb@php.net> | 1999-09-07 18:46:25 +0000 |
commit | 5c40e7c41ee1944f2b2eafb499128fba7a467b17 (patch) | |
tree | faf80cf12ce6a3ecdb522d14acf33c5743706604 /ext | |
parent | 7aacff63c9c9f66bae32e1ac77f3122178eb71c1 (diff) | |
download | php-git-5c40e7c41ee1944f2b2eafb499128fba7a467b17.tar.gz |
Add thread-safety notice here. The solution is using gethostbyname_r,
but it seems that it takes different parameters on Solaris and
Linux. ;-P We should probably make a wrapper function, and make a
configure test that checks if there is a reentrant version available,
and if not protect gethostbyname and similar calls with a mutex until
the results have been copied. Ugly.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/standard/fsock.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c index 3a653af83f..dd353a3ce2 100644 --- a/ext/standard/fsock.c +++ b/ext/standard/fsock.c @@ -131,6 +131,7 @@ int lookup_hostname(const char *addr, struct in_addr *in) struct hostent *host_info; if (!inet_aton(addr, in)) { + /* XXX NOT THREAD SAFE */ host_info = gethostbyname(addr); if (host_info == 0) { /* Error: unknown host */ |