httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: New httpd_monitor diffs
Date Thu, 21 Dec 1995 21:18:45 GMT
Chuck Murcko wrote:
> 
> Some comments:
> 
> On BSDI and FreeBSD, the logfile extension starts with 0 rather than a.
> So, the line
> 
>      sprintf(ext, ".a%05d", thepid); /* slurp */
> 
> becomes
> 
>      sprintf(ext, ".%06d", thepid); /* slurp */

Ugg... This is all due to the strange and unique ways that mktemp() generates
filenamed.

Why not just create mkscorename() which uses DEFAULT_SCOREBOARD name,
which is something like "/tmp/htstatus.%d" and tacks the PID at the
end. No need for anything fancier.

That way _we_ nail down exactly what we want the scoreboard file to be
called, and we don't relay on mktemp() at all. This also means that
whatever method we use in http_main.c can also be used in httpd_monitor.c
so even if we just tack the result of sprintf(buffer, DEFAULT_SCOREBOARD,
getpid()) it'll be OS ok (since the same code is used in both
programs). 
> 
> On UnixWare and SGI, the logfile extension is radix 64 PID representation.
> 
> This version appears to count the parent process. Is this true?

Nope. It skips those entries with a PID that's the main httpd process.
-- 
Jim Jagielski  << jim@jaguNET.com >>   |           "Wind the frog!"
  **  jaguNET Access Services  **      |       - Woody (from Toy Story)
++       Email: info@jaguNET.com      +++        Voice:  410-931-3157       ++
++       http://www.jaguNET.com/      +++         Data: 410-931-7060        ++

Mime
View raw message