That part I'm not happy about. Perl is not running at this point, so I'd rather not call perl functions here. I suggest another alternative, with the bonus that it now is logged into the error_log file if you have a sufficiently high LogLevel setting (Info or higher). I had to move the printout away from the code that generates it, but that's the first place where we can normally log to error_log.
Can't argue with that. Your patch (below) also works for me. Thanks again!
With the LogLevel set appropriately, I actually get the message coming out *four* times when I start the server:
[Tue Sep 16 09:22:43 2003] [info] mod_perl: using Perl HASH_SEED: 2294822312
[Tue Sep 16 09:22:44 2003] [info] mod_perl: using Perl HASH_SEED: 3042930004
[Tue Sep 16 09:22:44 2003] [notice] Parent: Created child process 2336
[Tue Sep 16 09:22:44 2003] [debug] mpm_winnt.c(505): Parent: Sent the scoreboard to the child
[Tue Sep 16 09:22:45 2003] [info] mod_perl: using Perl HASH_SEED: 3745517160
[Tue Sep 16 09:22:46 2003] [info] mod_perl: using Perl HASH_SEED: 370731127
[Tue Sep 16 09:22:46 2003] [notice] Child 2336: Child process is running
...
Is that as expected? I was only expecting to see it once, or maybe once in the parent and once in the child, but I'm sure I'm just missing something.
- Steve
Index: src/modules/perl/mod_perl.c =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.184 diff -u -r1.184 mod_perl.c --- src/modules/perl/mod_perl.c 16 Sep 2003 05:01:38 -0000 1.184 +++ src/modules/perl/mod_perl.c 16 Sep 2003 05:45:48 -0000 @@ -57,17 +57,6 @@
MP_init_hash_seed_set = TRUE;
}
-
- rv = apr_env_get(&s, "PERL_HASH_SEED_DEBUG", p);
- if (rv == APR_SUCCESS) {
- if (s) {
- int i = atoi(s);
- if (i == 1) {
- fprintf(stderr, "\nmod_perl: using init hash seed: %"UVuf"\n",
- MP_init_hash_seed);
- }
- }
- }
#endif
}
@@ -619,6 +608,11 @@ modperl_init_clones(s, pconf); #endif
+#ifdef MP_NEED_HASH_SEED_FIXUP
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
+ "mod_perl: using Perl HASH_SEED: %"UVuf, MP_init_hash_seed);
+#endif
+
return OK;
}
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]