Author: torsten
Date: Sat Feb 18 13:09:23 2012
New Revision: 1245916
URL: http://svn.apache.org/viewvc?rev=1245916&view=rev
Log:
suppress "perl=..." output in MP_TRACE output before the first interpreter has
been started
Modified:
perl/modperl/branches/threading/src/modules/perl/mod_perl.c
perl/modperl/branches/threading/src/modules/perl/modperl_common_log.c
Modified: perl/modperl/branches/threading/src/modules/perl/mod_perl.c
URL:
http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/mod_perl.c?rev=1245916&r1=1245915&r2=1245916&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/mod_perl.c (original)
+++ perl/modperl/branches/threading/src/modules/perl/mod_perl.c Sat Feb 18
13:09:23 2012
@@ -216,8 +216,10 @@ PerlInterpreter *modperl_startup(server_
server_rec *base_server = modperl_global_get_server_rec();
const char *desc = modperl_server_desc(s, p);
if (base_server == s) {
+ MP_init_status = 1; /* temporarily reset MP_init_status */
MP_TRACE_i(MP_FUNC,
"starting the parent perl for the base server", desc);
+ MP_init_status = 2;
}
else {
MP_TRACE_i(MP_FUNC,
Modified: perl/modperl/branches/threading/src/modules/perl/modperl_common_log.c
URL:
http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_common_log.c?rev=1245916&r1=1245915&r2=1245916&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_common_log.c
(original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_common_log.c Sat
Feb 18 13:09:23 2012
@@ -52,21 +52,27 @@ void modperl_trace(const char *func, con
/* for more information on formatting codes see
http://apr.apache.org/docs/apr/1.4/group__apr__lib.html#gad2cd3594aeaafd45931d1034965f48c1
*/
+
+ /* PERL_GET_CONTEXT yields nonsense until the first interpreter is
+ * created. Hence the modperl_is_running() question. */
if (modperl_threaded_mpm()) {
if (modperl_threads_started()) {
apr_file_printf(logfile, "[pid=%lu, tid=%pt, perl=%pp] ",
(unsigned long)getpid(),
- (void*)apr_os_thread_current(), PERL_GET_CONTEXT);
+ (void*)apr_os_thread_current(),
+ modperl_is_running() ? PERL_GET_CONTEXT : NULL);
}
else {
apr_file_printf(logfile, "[pid=%lu, perl=%pp] ",
- (unsigned long)getpid(), PERL_GET_CONTEXT);
+ (unsigned long)getpid(),
+ modperl_is_running() ? PERL_GET_CONTEXT : NULL);
}
}
else {
#ifdef USE_ITHREADS
apr_file_printf(logfile, "[pid=%lu, perl=%pp] ",
- (unsigned long)getpid(), PERL_GET_CONTEXT);
+ (unsigned long)getpid(),
+ modperl_is_running() ? PERL_GET_CONTEXT : NULL);
#else
apr_file_printf(logfile, "[pid=%lu] ", (unsigned long)getpid());
#endif