httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: Fwd: svn commit: r608508 - /httpd/httpd/trunk/modules/loggers/mod_log_forensic.c
Date Fri, 11 Jan 2008 23:18:17 GMT


On 01/11/2008 11:13 PM, Eric Covener wrote:
> On Jan 11, 2008 5:04 PM, Ruediger Pluem <rpluem@apache.org> wrote:
>>
>> On 01/11/2008 10:32 PM, Eric Covener wrote:
>>> -        id = apr_psprintf(r->pool, "%x:%lx:%x", getpid(), time(NULL),
>>> +        id = apr_psprintf(r->pool, "%" APR_PID_T_FMT "x:%lx:%x", getpid(),
>>>
>>> Stray 'x' in the new format string? No harm AFAICT.
>> On purpose. Before we had hex aoutput of the pid (don't know why) and there
>> is no APR_PID_T_FMT_HEX- So I concat APR_PID_T_FMT and x to get a hex output
>> I people thing that a hex output of a pid is stupid, well then lets remove the
>> x, but the initial intention of the commit was to remove compiler warning no
>> changing code.
> 
> For APR_PID_T_FMT of 'd' (my vanilla 32-bit linux system) the 'x' ends
> up in the output as in:
> 
> +26737x:4787e90e:0|GET /
> HTTP/1.0|User-Agent:Wget/1.10.2|Accept:*/*|Host:localhost|Connection:Keep-Alive
> -26737x:4787e90e:0

Ok, you convinced me in rereading the printf man page and now I agree that this does
not work as expected :-).
As I see no sense in hex pids anyway (for sure there is a reason why there is no
APR_PID_T_FMT_HEX :-), lets just drop the x.

Regards

RĂ¼diger



Mime
View raw message