It isn't quite that easy.  On Solaris the args for
gethostbyname_r are different than on the AS400.

I'll get it patched in the next day or so.

Glenn

Henri Gomez wrote:
Glenn Nielsen a écrit :

I have found another thread safe bug when running mod_jk 1.2 with Apache 2 and the worker
(threaded) MPM. This one is due to not using the reentrant version of gethostbyname().
I have only seen the problem on multiple CPU Sun servers.


I will be working on fixing this and will rebuild the test release once I have it
committed.



Hum, it seems there is patch for this provided by IBM Rochester team via #ifdef AS400 :

In jk_connect.c :

#ifdef AS400
/* If we found also characters we use gethostbyname_r()*/
struct hostent hostentry;
struct hostent *hoste = &hostentry;
struct hostent_data hd;
memset( &hd, 0, sizeof(struct hostent_data) );
if ( (gethostbyname_r( host, hoste, &hd )) != 0 ) {
return JK_FALSE;
}
#else /* If we found also characters we use gethostbyname()*/
/* XXX : WARNING : We should really use gethostbyname_r in multi-threaded env */
/* take a look at APR which handle gethostbyname in apr/network_io/unix/sa_common.c */
struct hostent *hoste = gethostbyname(host);
if(!hoste) {
return JK_FALSE;
}
#endif



Just replace #ifdef AS400 by _D_REENTRANT ?



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--
----------------------------------------------------------------------
Glenn Nielsen             [EMAIL PROTECTED] | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to