You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2003/10/02 23:30:35 UTC
cvs commit: modperl Changes
stas 2003/10/02 14:30:35
Modified: src/modules/perl mod_perl.c
. Changes
Log:
Add a workaround for the 'rand' bug for perl 5.8.1 (compiled with
either -DUSE_HASH_SEED or -DUSE_HASH_SEED_EXPLICIT, which is the
default), causing all forked procs to produce the same rand
sequence.
Revision Changes Path
1.147 +7 -0 modperl/src/modules/perl/mod_perl.c
Index: mod_perl.c
===================================================================
RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -u -r1.146 -r1.147
--- mod_perl.c 14 Mar 2003 04:45:52 -0000 1.146
+++ mod_perl.c 2 Oct 2003 21:30:35 -0000 1.147
@@ -707,6 +707,13 @@
}
MP_TRACE_g(fprintf(stderr, "ok\n"));
+#if (PERL_REVISION == 5) && (PERL_VERSION == 8) && (PERL_SUBVERSION == 1) && \
+ (defined(USE_HASH_SEED) || defined(USE_HASH_SEED_EXPLICIT))
+ /* bug in 5.8.1, causing all forked procs to produce the same rand
+ * sequence */
+ PL_srand_called = FALSE;
+#endif
+
perl_clear_env();
mod_perl_pass_env(p, cls);
mod_perl_set_cwd();
1.680 +5 -0 modperl/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/modperl/Changes,v
retrieving revision 1.679
retrieving revision 1.680
diff -u -u -r1.679 -r1.680
--- Changes 27 Sep 2003 20:06:59 -0000 1.679
+++ Changes 2 Oct 2003 21:30:35 -0000 1.680
@@ -10,6 +10,11 @@
=item 1.28_01-dev
+Add a workaround for the 'rand' bug for perl 5.8.1 (compiled with
+either -DUSE_HASH_SEED or -DUSE_HASH_SEED_EXPLICIT, which is the
+default), causing all forked procs to produce the same rand
+sequence. [Stas]
+
For Win32, add an INSTALL_LIB option to 'perl Makefile.PL' to
allow one to specify where to install mod_perl.lib. If not
given, this defaults to APACHE_SRC\libexec, if this exists.