httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wilfredo Sanchez <wsanc...@MIT.EDU>
Subject Re: Apache 1.3.20 rolled and ready for testing
Date Fri, 18 May 2001 00:48:58 GMT
On Thursday, May 17, 2001, at 05:39 PM, Wilfredo Sanchez wrote:

> And it exits with an entry in the error log:
> [Thu May 17 17:36:23 2001] [alert] mod_unique_id: unable to 
> gethostbyname("bartleby")

   The offending code is below.  It seems rather inappropriate to me for 
a module to be calling exit() under any circumstances.  For one thing, 
the pid file doesn't get cleaned up.  But apparently a lot of modules do 
this...  Something to clean up in 2.0...

   Anyway, the reason it didn't happen before is that I didn't enable 
that module before, so that's my bad; the code's been there a long time.

   Never mind me.


      * Now get the global in_addr.  Note that it is not sufficient to 
use one
      * of the addresses from the main_server, since those aren't as 
likely to
      * be unique as the physical address of the machine
     if (gethostname(str, sizeof(str) - 1) != 0) {
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, s,
                      "gethostname: mod_unique_id requires the "
                      "hostname of the server");
     str[sizeof(str) - 1] = '\0';

     if ((hent = gethostbyname(str)) == NULL) {
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, s,
                      "mod_unique_id: unable to gethostbyname(\"%s\")", 

View raw message