perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Foertsch <>
Subject Re: Please help adding ModPerl::Interpreter
Date Mon, 22 Oct 2007 10:20:06 GMT
On Monday 22 October 2007, Philippe M. Chiasson wrote:
> And make modperl_trace always prefix log messages with modperl_tid_pid()?

That makes sense. I didn't know about modperl_pid_tid(). But the 
implementation is not good.

1) It requires a pool that is not always available
2) It introduces a memory leak if the pool is long living

So I have implemented it directly in modperl_trace.

On question, the old implementation reads:

    if (modperl_threaded_mpm()) {
        return apr_psprintf(p, "%lu"
#endif /* APR_HAS_THREADS */
                            , (unsigned long)getpid()
                            , modperl_threads_started()
                            ? (unsigned long)apr_os_thread_current()
                            : 0
#endif /* APR_HAS_THREADS */

That suggests that it is possible to use a modperl built with a non-threaded 
perl with a threaded MPM. I think that can be ruled out.

BTW, modperl_trace adds a newline to the output. But almost all occurrences of 
MP_TRACE_x do the same. So, almost all trace lines appear with empty lines in 
between. Not that I want to patch that but why is it so?


View raw message